Check project slug availability
Check project slug availability: checkProjectSlugAvailability in the TypeScript, Python, Rust and Go clients.
GET /v1/organizations/{organizationId}/projects/slug-availability
Reports whether createProject would accept slug right now. Advisory: only the create itself allocates, so a caller must still handle SLUG_TAKEN. A malformed slug is rejected on shape; a reserved slug, a slug held by an active project, and a slug retired with a deleted project each answer available: false with a reason.
photon.organizations.projects.checkProjectSlugAvailability(input: CheckProjectSlugAvailabilityInput, options?: RequestOptions): Promise<CheckProjectSlugAvailabilityOutput>photon.organizations.projects.check_project_slug_availability(input: CheckProjectSlugAvailabilityInput, *, options: RequestOptions | None = None) -> models.CheckProjectSlugAvailabilityResponseclient.check_project_slug_availability(organization_id: String, slug: String).await -> Result<ResponseValue<types::CheckProjectSlugAvailabilityResponse>, Error<CheckProjectSlugAvailabilityError>>client.Organizations.Projects.CheckProjectSlugAvailability(ctx context.Context, params *CheckProjectSlugAvailabilityParams, opts ...RequestOption) (*CheckProjectSlugAvailabilityResponse, error)import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.organizations.projects.checkProjectSlugAvailability({
path: {
organizationId: "organizationId",
},
query: {
slug: "slug",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import CheckProjectSlugAvailabilityInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.organizations.projects.check_project_slug_availability(
CheckProjectSlugAvailabilityInput.model_validate({
"path": {
"organizationId": "organizationId",
},
"query": {
"slug": "slug",
},
})
)use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};
let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
.credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
.build()?;
let result = client
.check_project_slug_availability("organizationId".to_owned(), "slug".to_owned())
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();import (
"context"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
result, err := client.Organizations.Projects.CheckProjectSlugAvailability(ctx, &photonapi.CheckProjectSlugAvailabilityParams{
OrganizationID: "organizationId",
Slug: "slug",
})
if err != nil {
return err
}
_ = result{
"available": true,
"slug": "string"
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
Returns
200 Whether the slug can be allocated, and why not. CheckProjectSlugAvailabilityResponse
Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.
One of: AvailableProjectSlug
One of: UnavailableProjectSlug
304 Not Modified. Sent only when If-None-Match matches the ETag of an earlier 200 response for the same representation; no body. No body.
Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.