pub struct Client { /* private fields */ }Expand description
Client for Photon API v1.0.0.
Servers declared by the spec:
https://api.photon.codes
Implementations§
Source§impl Client
impl Client
pub fn new(base_url: &str) -> Result<Self, Error<Infallible>>
Sourcepub fn with_default_server() -> Result<Self, Error<Infallible>>
pub fn with_default_server() -> Result<Self, Error<Infallible>>
Build a client on the first server the specification declares, with every server variable at its declared default.
pub fn with_client( client: Client, base_url: &str, ) -> Result<Self, Error<Infallible>>
Sourcepub fn with_backend(
backend: Arc<dyn HttpBackend>,
base_url: &str,
) -> Result<Self, Error<Infallible>>
pub fn with_backend( backend: Arc<dyn HttpBackend>, base_url: &str, ) -> Result<Self, Error<Infallible>>
Build a client over a caller-supplied transport backend — the injection point for
retry, middleware, or a non-reqwest transport. Requests are still built on a default
reqwest::Client; only the execute step goes through the backend.
pub fn core(&self) -> &ClientCore
Sourcepub fn with_credential(self, scheme: &str, credential: Credential) -> Self
pub fn with_credential(self, scheme: &str, credential: Credential) -> Self
Register a credential for a named security scheme. Operations whose security
requirement cannot be satisfied by the registered credentials fail with a
request-construction error before anything is sent.
§Declared schemes
accountServiceKey—http(bearer).- Account Service Key, prefixed with
pho_ask_, sent asAuthorization: Bearer <key>. Acts on behalf of its owning account, subject to the permissions and credential restrictions of each operation. Account access tokens and OAuth grants also use the Bearer header. In organizations that require SSO, Account Service Keys are not accepted for managing the organization’s SSO settings, deleting the organization, or checking whether it can be deleted.
- Account Service Key, prefixed with
oauth2—oauth2.- OAuth grant issued by the Photon authorization server. The token is a bearer JWT whose consented scope is intersected with the permissions the route grants; an empty intersection is
403 insufficient_scope. - Flow
authorizationCode:- authorization: https://auth.photon.codes/oauth2/authorize
- token: https://auth.photon.codes/oauth2/token
- scope
account:create_project— Create a project owned by the account. - scope
account:read— View account profile. - scope
account:read_projects— List projects associated with the account; does not grant access to project contents. - scope
account:write— Update account name and profile. - scope
billing:read— View invoices, usage, payment status. - scope
events:read— Query stored Events and discover their SQL schema within a project. - scope
organization:create_project— Create a project in the organization. - scope
organization:read— View organization name and avatar. - scope
organization:read_projects— List projects in the organization. - scope
platforms:read— View project platform configuration. - scope
platforms:write— Change project platform configuration. - scope
project:delete— Permanently delete the project. - scope
project:read— View non-sensitive project settings. - scope
project:read_usage— View project usage and costs. - scope
project:write— Change agent profiles, webhook settings, and other project configuration. - scope
ten_dlc:read— View organization 10DLC Brand and Campaign registration records. - scope
ten_dlc:write— Register and update organization 10DLC Brands and Campaigns, including OTP operations.
- OAuth grant issued by the Photon authorization server. The token is a bearer JWT whose consented scope is intersected with the permissions the route grants; an empty intersection is
projectApiKey—http(bearer).- Project API key,
pho_sk_prefixed, sent asAuthorization: Bearer <key>. Bound to one project, so it is accepted only under/v1/projects/{projectId}and refused everywhere else.
- Project API key,
serviceIdentityBearer—http(bearer).- Organization Service Identity API key or M2M access token, sent as
Authorization: Bearer <credential>. Restricted to its organization and explicitly granted business permissions. It does not authorize human organization governance or Photon credential management. Never send an M2M client secret to a business endpoint.
- Organization Service Identity API key or M2M access token, sent as
Sourcepub async fn delete_account(
&self,
) -> Result<ResponseValue<Account>, Error<DeleteAccountError>>
pub async fn delete_account( &self, ) -> Result<ResponseValue<Account>, Error<DeleteAccountError>>
Delete account
Deletes the authenticated account and returns its account tombstone. The operation is rejected while the account still owns organizations; transfer or close those organizations before retrying. This endpoint acts on the caller’s account and does not accept another account’s identifier.
Tags: Account.
Response 200: The deleted account tombstone.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ACCOUNT_NOT_FOUND: Account Not Found
Response 409: ACCOUNT_OWNS_ORGANIZATIONS: Account Owns Organizations
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn get_account(
&self,
) -> Result<ResponseValue<Account>, Error<GetAccountError>>
pub async fn get_account( &self, ) -> Result<ResponseValue<Account>, Error<GetAccountError>>
Get account
Returns the profile of the authenticated account. The account is selected from the credential rather than a request parameter. A missing or deleted account is reported as an error instead of an empty profile.
Tags: Account.
Response 200: The authenticated account.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ACCOUNT_NOT_FOUND: Account Not Found
Response 410: ACCOUNT_DELETED: Account Deleted
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn update_account(
&self,
idempotency_key: String,
body: &UpdateAccountRequest,
) -> Result<ResponseValue<Account>, Error<UpdateAccountError>>
pub async fn update_account( &self, idempotency_key: String, body: &UpdateAccountRequest, ) -> Result<ResponseValue<Account>, Error<UpdateAccountError>>
Update account
Updates the supplied firstName and lastName fields on the authenticated account and returns the updated profile. Only the documented profile fields can be changed through this endpoint; profile-picture uploads and phone-number verification use their dedicated operations. Supply the required Idempotency-Key header.
Tags: Account.
Response 200: The updated account.
Response 400: HTTP_ERROR: Request Failed; INVALID_ARGUMENT: Invalid Argument; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid; IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ACCOUNT_NOT_FOUND: Account Not Found
Response 410: ACCOUNT_DELETED: Account Deleted
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused; VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
List connected applications
Lists the OAuth applications authorized by the authenticated user.
Tags: Connected Applications.
Response 200: OAuth applications authorized by the authenticated user.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Revoke connected application
Revokes the authenticated user’s grant for one OAuth application.
Tags: Connected Applications.
Response 204: OAuth application grant revoked.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn confirm_account_phone_verification(
&self,
body: &ConfirmAccountPhoneVerificationRequest,
) -> Result<ResponseValue<Account>, Error<ConfirmAccountPhoneVerificationError>>
pub async fn confirm_account_phone_verification( &self, body: &ConfirmAccountPhoneVerificationRequest, ) -> Result<ResponseValue<Account>, Error<ConfirmAccountPhoneVerificationError>>
Confirm phone verification
Binds the number once the code is approved. Repeat calls return the bound Account.
Tags: Account.
Response 200: The Account with its verified phone number.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ACCOUNT_NOT_FOUND: Account Not Found
Response 410: ACCOUNT_DELETED: Account Deleted
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn start_account_phone_verification(
&self,
body: &StartAccountPhoneVerificationRequest,
) -> Result<ResponseValue<StartAccountPhoneVerificationResponse>, Error<StartAccountPhoneVerificationError>>
pub async fn start_account_phone_verification( &self, body: &StartAccountPhoneVerificationRequest, ) -> Result<ResponseValue<StartAccountPhoneVerificationResponse>, Error<StartAccountPhoneVerificationError>>
Start phone verification
Sends an SMS code. Answers CAPTCHA_REQUIRED with the widget to render when no solved challenge accompanies the request; retry with the returned challengeContext and a token. Rate limited per account, per destination number, and globally; a rejection carries Retry-After.
Tags: Account.
Response 201: A pending verification. The Account is unchanged.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch; CAPTCHA_REQUIRED: Captcha Required
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ACCOUNT_NOT_FOUND: Account Not Found
Response 410: ACCOUNT_DELETED: Account Deleted
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn reset_account_profile_picture(
&self,
idempotency_key: String,
) -> Result<ResponseValue<Account>, Error<ResetAccountProfilePictureError>>
pub async fn reset_account_profile_picture( &self, idempotency_key: String, ) -> Result<ResponseValue<Account>, Error<ResetAccountProfilePictureError>>
Remove profile picture
Removes the authenticated account’s custom profile picture and returns the account using its default picture. This operation does not upload a replacement; use the upload-and-commit operations when setting a new custom picture. Supply the required Idempotency-Key header.
Tags: Account.
Response 200: The Account reset to its default profile picture.
Response 400: INVALID_ARGUMENT: Invalid Argument; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid; IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ACCOUNT_NOT_FOUND: Account Not Found
Response 410: ACCOUNT_DELETED: Account Deleted
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused; VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn commit_account_profile_picture(
&self,
idempotency_key: String,
body: &CommitAccountProfilePictureRequest,
) -> Result<ResponseValue<Account>, Error<CommitAccountProfilePictureError>>
pub async fn commit_account_profile_picture( &self, idempotency_key: String, body: &CommitAccountProfilePictureRequest, ) -> Result<ResponseValue<Account>, Error<CommitAccountProfilePictureError>>
Commit profile picture
Commits a profile picture previously uploaded through createAccountProfilePictureUpload. Call this only after the direct multipart upload succeeds, using the uploadId from the same upload session and a stable Idempotency-Key. The service validates the temporary object’s ownership, size, content type, image bytes, dimensions, encryption, and age before changing the Account.
Tags: Account.
Response 200: The Account with its committed profile picture.
Response 400: INVALID_ARGUMENT: Invalid Argument; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid; IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ACCOUNT_NOT_FOUND: Account Not Found
Response 410: ACCOUNT_DELETED: Account Deleted
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused; VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn create_account_profile_picture_upload(
&self,
body: &ProfilePictureUploadRequest,
) -> Result<ResponseValue<ProfilePictureUpload>, Error<CreateAccountProfilePictureUploadError>>
pub async fn create_account_profile_picture_upload( &self, body: &ProfilePictureUploadRequest, ) -> Result<ResponseValue<ProfilePictureUpload>, Error<CreateAccountProfilePictureUploadError>>
Create profile picture upload
Creates a ten-minute, Account-bound presigned S3 POST for a JPEG, PNG, or WebP profile picture up to 5 MiB. Copy every returned formFields entry into a multipart/form-data request to uploadUrl, append the local file as the final form part, and upload it directly without sending Photon credentials. After the upload succeeds, call commitAccountProfilePicture with the returned uploadId. Do not cache or log the upload URL or form fields.
Tags: Account.
Response 201: A short-lived, Account-bound presigned S3 POST.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ACCOUNT_NOT_FOUND: Account Not Found
Response 410: ACCOUNT_DELETED: Account Deleted
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn list_account_service_keys(
&self,
) -> Result<ResponseValue<ListAccountServiceKeysResponse>, Error<ListAccountServiceKeysError>>
pub async fn list_account_service_keys( &self, ) -> Result<ResponseValue<ListAccountServiceKeysResponse>, Error<ListAccountServiceKeysError>>
List Account Service Keys
Returns metadata for the authenticated account’s unrevoked service keys, including expired keys, ordered newest first. Secret values are not returned; a key’s credential is disclosed only when that key is created.
Tags: Account Service Keys.
Response 200: Unrevoked Account Service Key metadata, including expired keys, newest first.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ACCOUNT_NOT_FOUND: Account Not Found
Response 410: ACCOUNT_DELETED: Account Deleted
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn create_account_service_key(
&self,
idempotency_key: String,
body: &CreateAccountServiceKeyRequest,
) -> Result<ResponseValue<CreateAccountServiceKeyResponse>, Error<CreateAccountServiceKeyError>>
pub async fn create_account_service_key( &self, idempotency_key: String, body: &CreateAccountServiceKeyRequest, ) -> Result<ResponseValue<CreateAccountServiceKeyResponse>, Error<CreateAccountServiceKeyError>>
Create Account Service Key
Creates a service key for the authenticated account with the supplied name and optional expiresAt. Returns key metadata and a one-time credential; store the credential securely because it cannot be retrieved through the listing endpoint. These credentials act as the account and must not be distributed as project-scoped keys. Supply the required Idempotency-Key header.
Tags: Account Service Keys.
Response 201: The created Account Service Key and its one-time credential.
Response 400: INVALID_ARGUMENT: Invalid Argument; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid; IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ACCOUNT_NOT_FOUND: Account Not Found
Response 409: ACCOUNT_SERVICE_KEY_LIMIT_REACHED: Account Service Key Limit Reached
Response 410: ACCOUNT_DELETED: Account Deleted
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused; VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn revoke_account_service_key(
&self,
idempotency_key: String,
service_key_id: String,
) -> Result<ResponseValue<RevokeAccountServiceKeyResponse>, Error<RevokeAccountServiceKeyError>>
pub async fn revoke_account_service_key( &self, idempotency_key: String, service_key_id: String, ) -> Result<ResponseValue<RevokeAccountServiceKeyResponse>, Error<RevokeAccountServiceKeyError>>
Revoke Account Service Key
Revokes the account-owned service key identified by serviceKeyId and returns its revoked metadata. Repeating the revocation is stable. Revocation changes the credential’s validity; it does not create a replacement key. Supply the required Idempotency-Key header.
Tags: Account Service Keys.
Response 200: The revoked key metadata. Repeated revocation is stable.
Response 400: INVALID_ARGUMENT: Invalid Argument; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid; IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ACCOUNT_NOT_FOUND: Account Not Found; ACCOUNT_SERVICE_KEY_NOT_FOUND: Account Service Key Not Found
Response 410: ACCOUNT_DELETED: Account Deleted
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused; VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Start device authorization
Starts the device authorization flow for a CLI or another device without a browser. Show the verification URL and user code, then poll the token endpoint at the returned interval. No request fields are required; any supplied body is ignored.
Tags: Device Authorization.
Response 200: Verification details for the RFC 8628 device flow. The optional JSON or form body is ignored; the authorization client is selected by the server.
Response 400: The authorization request was rejected. OAuth errors use error and error_description fields.
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Sourcepub async fn device_token(
&self,
body: &DeviceTokenRequest,
) -> Result<ResponseValue<DeviceTokenResponse>, Error<DeviceTokenError>>
pub async fn device_token( &self, body: &DeviceTokenRequest, ) -> Result<ResponseValue<DeviceTokenResponse>, Error<DeviceTokenError>>
Exchange device code or refresh token
Exchanges an authorized device code or a refresh token for an access token and rotating refresh token. Accepts JSON and form-encoded bodies. While polling, wait at least interval seconds and increase the interval on slow_down. Store the new refresh token after every successful grant.
This SDK method sends uncompressed JSON (application/json). Other request formats described above apply to direct HTTP requests.
Tags: Device Authorization.
Response 200: Token pair (snake_case OAuth wire format). Body (form-encoded or JSON): grant_type=urn:ietf:params:oauth:grant-type:device_code with device_code, or grant_type=refresh_token with refresh_token. Refresh tokens rotate on every grant — always store the new one.
Response 400: authorization_pending, slow_down, access_denied, expired_token, invalid_grant, invalid_request, or unsupported_grant_type. Errors use the OAuth 2.0 format ({error, error_description?}), not problem+json. A 5xx problem+json response is transient; keep polling.
Response 429: Relayed slow_down; back off the polling interval.
Response 500: server_error: the login could not be completed; retry the login from the start.
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Sourcepub async fn start_enterprise_login(
&self,
body: &StartEnterpriseLoginRequest,
) -> Result<ResponseValue<StartEnterpriseLoginResponse>, Error<StartEnterpriseLoginError>>
pub async fn start_enterprise_login( &self, body: &StartEnterpriseLoginRequest, ) -> Result<ResponseValue<StartEnterpriseLoginResponse>, Error<StartEnterpriseLoginError>>
Start company sign-in
Returns a sign-in URL without requiring an existing account: the company SSO connection when the target has a ready connection, otherwise ordinary account login. Supply one documented enrollment variant: organizationId with returnTo (optionally invitationToken), invitationToken with returnTo, or retryToken. Open the returned URL to continue authentication; receiving a URL does not complete sign-in. This is a browser flow: the request must come from an allowed Origin, and the retryToken variant also needs the retry cookie set by the failed sign-in, so send it with credentials.
Tags: Authentication.
Response 200: Company SSO URL when the target has a ready connection, otherwise the ordinary Account login URL. The response never says which, and access is decided only after authentication.
Response 400: INVALID_RETURN_TO: Invalid Return To
Sourcepub async fn list_oauth_scopes(
&self,
) -> Result<ResponseValue<ListOauthScopesResponse>, Error<ListOauthScopesError>>
pub async fn list_oauth_scopes( &self, ) -> Result<ResponseValue<ListOauthScopesResponse>, Error<ListOauthScopesError>>
List OAuth scopes
Lists the business permissions available to OAuth applications.
Tags: OAuth Discovery.
Response 200: The configurable OAuth business permissions.
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn get_organization_connection_status(
&self,
org_id: String,
) -> Result<ResponseValue<OrganizationConnectionStatus>, Error<GetOrganizationConnectionStatusError>>
pub async fn get_organization_connection_status( &self, org_id: String, ) -> Result<ResponseValue<OrganizationConnectionStatus>, Error<GetOrganizationConnectionStatusError>>
Get organization connection status
Requires current human organization membership. Synchronization status does not attest SSO configuration or completed authorization.
Tags: Organization Connections.
Response 200: Organization mapping and current member synchronization.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ORGANIZATION_CONNECTION_NOT_FOUND: Organization Connection Not Found
Response 409: ORGANIZATION_SYNC_UNAVAILABLE: Organization Synchronization Unavailable
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn retry_organization_connection_sync(
&self,
org_id: String,
) -> Result<ResponseValue<OrganizationConnectionStatus>, Error<RetryOrganizationConnectionSyncError>>
pub async fn retry_organization_connection_sync( &self, org_id: String, ) -> Result<ResponseValue<OrganizationConnectionStatus>, Error<RetryOrganizationConnectionSyncError>>
Retry organization connection sync
Reconciles existing local intent. Takes no body and cannot change membership, roles or authentication policy.
Tags: Organization Connections.
Response 200: Current synchronization state after requesting retry.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ORGANIZATION_CONNECTION_NOT_FOUND: Organization Connection Not Found
Response 409: ORGANIZATION_SYNC_UNAVAILABLE: Organization Synchronization Unavailable
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn get_organization_sso_configuration(
&self,
org_id: String,
) -> Result<ResponseValue<OrganizationSsoConfiguration>, Error<GetOrganizationSsoConfigurationError>>
pub async fn get_organization_sso_configuration( &self, org_id: String, ) -> Result<ResponseValue<OrganizationSsoConfiguration>, Error<GetOrganizationSsoConfigurationError>>
Get organization SSO configuration
Returns the selected organization’s SSO connection state, configuration version, and desired and effective policy settings. Read policySyncStatus alongside the enforcement fields to distinguish requested settings from synchronized settings.
Tags: Organization SSO.
Response 200: Current connection and independent local policy state.
Response 400: INVALID_RETURN_TO: Invalid Return To; INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ORGANIZATION_SSO_NOT_FOUND: Organization SSO Not Found
Response 409: ORGANIZATION_SSO_CONFLICT: Organization SSO Conflict
Response 412: ORGANIZATION_SSO_PRECONDITION_FAILED: Organization SSO Precondition Failed; SSO_SUBSCRIPTION_REQUIRED: SSO Subscription Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn update_organization_sso_policy(
&self,
org_id: String,
body: &UpdateOrganizationSsoPolicyRequest,
) -> Result<ResponseValue<OrganizationSsoConfiguration>, Error<UpdateOrganizationSsoPolicyError>>
pub async fn update_organization_sso_policy( &self, org_id: String, body: &UpdateOrganizationSsoPolicyRequest, ) -> Result<ResponseValue<OrganizationSsoConfiguration>, Error<UpdateOrganizationSsoPolicyError>>
Update organization SSO policy
Updates whether SSO can admit new members automatically using ssoJitEnabled and the current expectedVersion. Returns the organization’s SSO configuration and policy synchronization status; a successful response does not mean every desired policy setting has finished synchronizing.
Tags: Organization SSO.
Response 200: Current connection and independent local policy state.
Response 400: INVALID_RETURN_TO: Invalid Return To; INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ORGANIZATION_SSO_NOT_FOUND: Organization SSO Not Found
Response 409: ORGANIZATION_SSO_CONFLICT: Organization SSO Conflict
Response 412: ORGANIZATION_SSO_PRECONDITION_FAILED: Organization SSO Precondition Failed; SSO_SUBSCRIPTION_REQUIRED: SSO Subscription Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn begin_organization_sso_admission(
&self,
org_id: String,
body: &OrganizationAuthenticationRequest,
) -> Result<ResponseValue<OrganizationAuthenticationRedirect>, Error<BeginOrganizationSsoAdmissionError>>
pub async fn begin_organization_sso_admission( &self, org_id: String, body: &OrganizationAuthenticationRequest, ) -> Result<ResponseValue<OrganizationAuthenticationRedirect>, Error<BeginOrganizationSsoAdmissionError>>
Begin organization SSO admission
Returns an SSO admission URL for an existing account and the selected organization. Supply returnTo for the continuation URL. Admission requires completing the returned authentication flow; creating the URL does not itself grant membership.
Tags: Organization SSO.
Response 200: Targeted SSO authorization URL.
Response 400: INVALID_RETURN_TO: Invalid Return To; INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ORGANIZATION_SSO_NOT_FOUND: Organization SSO Not Found
Response 409: ORGANIZATION_SSO_CONFLICT: Organization SSO Conflict
Response 412: ORGANIZATION_SSO_PRECONDITION_FAILED: Organization SSO Precondition Failed; SSO_SUBSCRIPTION_REQUIRED: SSO Subscription Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn begin_organization_authentication(
&self,
org_id: String,
body: &OrganizationAuthenticationRequest,
) -> Result<ResponseValue<OrganizationAuthenticationRedirect>, Error<BeginOrganizationAuthenticationError>>
pub async fn begin_organization_authentication( &self, org_id: String, body: &OrganizationAuthenticationRequest, ) -> Result<ResponseValue<OrganizationAuthenticationRedirect>, Error<BeginOrganizationAuthenticationError>>
Sign in with organization SSO
Returns a URL to authenticate through the selected organization’s current SSO connection. Supply returnTo and open the returned URL to continue the flow. Receiving the URL does not establish an authenticated session.
Tags: Organization SSO.
Response 200: Targeted SSO authorization URL.
Response 400: INVALID_RETURN_TO: Invalid Return To; INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ORGANIZATION_SSO_NOT_FOUND: Organization SSO Not Found
Response 409: ORGANIZATION_SSO_CONFLICT: Organization SSO Conflict
Response 412: ORGANIZATION_SSO_PRECONDITION_FAILED: Organization SSO Precondition Failed; SSO_SUBSCRIPTION_REQUIRED: SSO Subscription Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn begin_organization_closure_authentication(
&self,
org_id: String,
body: &OrganizationAuthenticationRequest,
) -> Result<ResponseValue<OrganizationAuthenticationRedirect>, Error<BeginOrganizationClosureAuthenticationError>>
pub async fn begin_organization_closure_authentication( &self, org_id: String, body: &OrganizationAuthenticationRequest, ) -> Result<ResponseValue<OrganizationAuthenticationRedirect>, Error<BeginOrganizationClosureAuthenticationError>>
Sign in to close organization
Returns an authentication URL for the current organization owner to inspect organization closure. Supply returnTo and complete the returned flow. This operation initiates authentication and does not close the organization.
Tags: Organization SSO.
Response 200: Targeted SSO authorization URL.
Response 400: INVALID_RETURN_TO: Invalid Return To; INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ORGANIZATION_SSO_NOT_FOUND: Organization SSO Not Found
Response 409: ORGANIZATION_SSO_CONFLICT: Organization SSO Conflict
Response 412: ORGANIZATION_SSO_PRECONDITION_FAILED: Organization SSO Precondition Failed; SSO_SUBSCRIPTION_REQUIRED: SSO Subscription Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn disable_organization_sso(
&self,
idempotency_key: String,
org_id: String,
body: &DisableOrganizationSsoRequest,
) -> Result<ResponseValue<OrganizationSsoConfiguration>, Error<DisableOrganizationSsoError>>
pub async fn disable_organization_sso( &self, idempotency_key: String, org_id: String, body: &DisableOrganizationSsoRequest, ) -> Result<ResponseValue<OrganizationSsoConfiguration>, Error<DisableOrganizationSsoError>>
Disable organization SSO
Deletes the provider connection, releases the SSO requirement once the connection is gone, then unbinds the chosen domains. Retry with the same Idempotency-Key to resume or await the same run.
Tags: Organization SSO.
Response 200: Current connection and independent local policy state.
Response 400: INVALID_RETURN_TO: Invalid Return To; INVALID_ARGUMENT: Invalid Argument; IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ORGANIZATION_SSO_NOT_FOUND: Organization SSO Not Found
Response 409: ORGANIZATION_SSO_CONFLICT: Organization SSO Conflict
Response 412: ORGANIZATION_SSO_PRECONDITION_FAILED: Organization SSO Precondition Failed; SSO_SUBSCRIPTION_REQUIRED: SSO Subscription Required
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn begin_invitation_sso(
&self,
org_id: String,
body: &BeginInvitationSsoRequest,
) -> Result<ResponseValue<OrganizationAuthenticationRedirect>, Error<BeginInvitationSsoError>>
pub async fn begin_invitation_sso( &self, org_id: String, body: &BeginInvitationSsoRequest, ) -> Result<ResponseValue<OrganizationAuthenticationRedirect>, Error<BeginInvitationSsoError>>
Sign in with invitation SSO
Returns an authentication URL for the organization SSO connection associated with the supplied invitation token. Supply token and returnTo. Complete the returned authentication flow; requesting its URL does not itself accept the invitation.
Tags: Organization SSO.
Response 200: Invitation-bound SSO authorization URL.
Response 400: INVALID_RETURN_TO: Invalid Return To; INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ORGANIZATION_SSO_NOT_FOUND: Organization SSO Not Found
Response 409: ORGANIZATION_SSO_CONFLICT: Organization SSO Conflict
Response 412: ORGANIZATION_SSO_PRECONDITION_FAILED: Organization SSO Precondition Failed; SSO_SUBSCRIPTION_REQUIRED: SSO Subscription Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn create_organization_sso_portal_link(
&self,
org_id: String,
body: &CreateOrganizationSsoPortalLinkRequest,
) -> Result<ResponseValue<CreateOrganizationSsoPortalLinkResponse>, Error<CreateOrganizationSsoPortalLinkError>>
pub async fn create_organization_sso_portal_link( &self, org_id: String, body: &CreateOrganizationSsoPortalLinkRequest, ) -> Result<ResponseValue<CreateOrganizationSsoPortalLinkResponse>, Error<CreateOrganizationSsoPortalLinkError>>
Create organization setup portal link
Returns an organization setup portal URL. Supply returnTo and optionally intent, either sso or domain_verification; sso is the default. Open the returned URL to complete the selected setup flow.
Tags: Organization SSO.
Response 200: Short-lived provider setup link.
Response 400: INVALID_RETURN_TO: Invalid Return To; INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ORGANIZATION_SSO_NOT_FOUND: Organization SSO Not Found
Response 409: ORGANIZATION_SSO_CONFLICT: Organization SSO Conflict
Response 412: ORGANIZATION_SSO_PRECONDITION_FAILED: Organization SSO Precondition Failed; SSO_SUBSCRIPTION_REQUIRED: SSO Subscription Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn refresh_organization_sso_connection(
&self,
org_id: String,
) -> Result<ResponseValue<OrganizationSsoConfiguration>, Error<RefreshOrganizationSsoConnectionError>>
pub async fn refresh_organization_sso_connection( &self, org_id: String, ) -> Result<ResponseValue<OrganizationSsoConfiguration>, Error<RefreshOrganizationSsoConnectionError>>
Refresh organization SSO connection
Refreshes the selected organization’s SSO connection and returns its current connection state, configuration version and policy synchronization status. This operation takes no request body.
Tags: Organization SSO.
Response 200: Current connection and independent local policy state.
Response 400: INVALID_RETURN_TO: Invalid Return To; INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ORGANIZATION_SSO_NOT_FOUND: Organization SSO Not Found
Response 409: ORGANIZATION_SSO_CONFLICT: Organization SSO Conflict
Response 412: ORGANIZATION_SSO_PRECONDITION_FAILED: Organization SSO Precondition Failed; SSO_SUBSCRIPTION_REQUIRED: SSO Subscription Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn create_app_installation_request(
&self,
body: &CreateAppInstallationRequestRequest,
) -> Result<ResponseValue<CreateAppInstallationRequestResponse>, Error<CreateAppInstallationRequestError>>
pub async fn create_app_installation_request( &self, body: &CreateAppInstallationRequestRequest, ) -> Result<ResponseValue<CreateAppInstallationRequestResponse>, Error<CreateAppInstallationRequestError>>
Request app installation
Authenticates a registered app backend using a short-lived signed client assertion. Creates request metadata only; customer approval is still required.
Tags: App Installations.
Response 201: Installation request metadata. No customer credential or access is issued.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: APP_INSTALLATION_ASSERTION_INVALID: Invalid Installation Client Assertion
Response 409: APP_INSTALLATION_ASSERTION_REPLAYED: Installation Assertion Already Used; APP_INSTALLATION_CONFIG_CHANGED: Installation App Configuration Changed
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn redeem_app_installation_delivery(
&self,
body: &RedeemAppInstallationDeliveryRequest,
) -> Result<ResponseValue<RedeemAppInstallationDeliveryResponse>, Error<RedeemAppInstallationDeliveryError>>
pub async fn redeem_app_installation_delivery( &self, body: &RedeemAppInstallationDeliveryRequest, ) -> Result<ResponseValue<RedeemAppInstallationDeliveryResponse>, Error<RedeemAppInstallationDeliveryError>>
Redeem installation credential
The registered app backend authenticates with a signed client assertion and a single-use code. Plaintext is returned only once; retries return status and never create another credential.
Tags: App Installations.
Response 200: First successful delivery or metadata-only operation status.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: APP_INSTALLATION_ASSERTION_INVALID: Invalid Installation Client Assertion
Response 409: APP_INSTALLATION_DELIVERY_UNAVAILABLE: Installation Delivery Unavailable
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn get_organization_billing_overview(
&self,
organization_id: String,
) -> Result<ResponseValue<GetOrganizationBillingOverviewResponse>, Error<GetOrganizationBillingOverviewError>>
pub async fn get_organization_billing_overview( &self, organization_id: String, ) -> Result<ResponseValue<GetOrganizationBillingOverviewResponse>, Error<GetOrganizationBillingOverviewError>>
Get organization billing overview
Returns the selected organization’s billing subscription and entitlementsVersion. The subscription can be null. Read the returned plan, charges and entitlements to inspect organization billing; this operation does not purchase or change a plan.
Tags: Organization Billing.
Response 200: The organization-owned plan and its resolved entitlements.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: FAILED_PRECONDITION: Failed Precondition
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn create_organization_payment_method_checkout(
&self,
organization_id: String,
params: Option<CreateOrganizationPaymentMethodCheckoutParams>,
) -> Result<ResponseValue<CreateOrganizationPaymentMethodCheckoutResponse>, Error<CreateOrganizationPaymentMethodCheckoutError>>
pub async fn create_organization_payment_method_checkout( &self, organization_id: String, params: Option<CreateOrganizationPaymentMethodCheckoutParams>, ) -> Result<ResponseValue<CreateOrganizationPaymentMethodCheckoutResponse>, Error<CreateOrganizationPaymentMethodCheckoutError>>
Create payment method checkout
Returns a hosted payment-method collection URL for the selected organization. An Idempotency-Key header is optional; supply one to make retries safe. Complete the returned checkout flow. Receiving the URL does not mean a card has been saved; check payment-method status afterward.
Tags: Organization Billing.
Response 200: Hosted card-capture page for the organization.
Response 400: INVALID_ARGUMENT: Invalid Argument; IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: FAILED_PRECONDITION: Failed Precondition
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable; PAYMENT_PROVIDER_NOT_READY: Payment Provider Not Ready
UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn list_invoices(
&self,
organization_id: String,
) -> Result<ResponseValue<ListInvoicesResponse>, Error<ListInvoicesError>>
pub async fn list_invoices( &self, organization_id: String, ) -> Result<ResponseValue<ListInvoicesResponse>, Error<ListInvoicesError>>
List invoices
Returns a single page of the selected organization’s invoices; invoices with a zero total are excluded. Use the documented invoice fields to inspect each invoice’s billing state. Listing invoices does not make a payment or modify a subscription.
Tags: Organization Billing.
Response 200: A single page of the organization’s invoices, excluding invoices with a zero total, in no guaranteed order.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: FAILED_PRECONDITION: Failed Precondition
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn get_organization_payment_method(
&self,
organization_id: String,
) -> Result<ResponseValue<GetOrganizationPaymentMethodResponse>, Error<GetOrganizationPaymentMethodError>>
pub async fn get_organization_payment_method( &self, organization_id: String, ) -> Result<ResponseValue<GetOrganizationPaymentMethodResponse>, Error<GetOrganizationPaymentMethodError>>
Get organization payment method
Reports whether the selected organization has a card on file and returns its documented payment-method metadata. Reading this endpoint does not collect a new card or create a checkout session.
Tags: Organization Billing.
Response 200: Whether the organization has a captured card and its metadata.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: FAILED_PRECONDITION: Failed Precondition
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn preview_organization_change(
&self,
organization_id: String,
body: &PreviewOrganizationChangeRequest,
) -> Result<ResponseValue<PreviewOrganizationChangeResponse>, Error<PreviewOrganizationChangeError>>
pub async fn preview_organization_change( &self, organization_id: String, body: &PreviewOrganizationChangeRequest, ) -> Result<ResponseValue<PreviewOrganizationChangeResponse>, Error<PreviewOrganizationChangeError>>
Preview an organization billing change
Previews a fixed-charge quantity change on the selected organization’s own subscription, such as SSO. Prices the change by the billing engine exactly as making it would bill it now: dueNow is that invoice, with taxes and the payer’s credits applied. A quantity already paid for this period is not billed again, so a purchase after a release can be free. nextCharge is what is charged in advance at the next period start. For a fixed-charge change, pass quote on with the purchase so it is refused if the price or period no longer hold. This operation does not change billing.
Tags: Organization Billing.
Response 200: What the change would bill.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: FAILED_PRECONDITION: Failed Precondition
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn preview_project_change(
&self,
organization_id: String,
project_id: String,
body: &PreviewProjectChangeRequest,
) -> Result<ResponseValue<PreviewProjectChangeResponse>, Error<PreviewProjectChangeError>>
pub async fn preview_project_change( &self, organization_id: String, project_id: String, body: &PreviewProjectChangeRequest, ) -> Result<ResponseValue<PreviewProjectChangeResponse>, Error<PreviewProjectChangeError>>
Preview a project billing change
Previews a change on the selected project’s subscription in the supplied category: a fixed-charge quantity change, or a plan change with the held fixed charges it carries over. Prices the change by the billing engine exactly as making it would bill it now: dueNow is that invoice, with taxes and the payer’s credits applied. A quantity already paid for this period is not billed again, so a purchase after a release can be free. nextCharge is what is charged in advance at the next period start. For a fixed-charge change, pass quote on with the purchase so it is refused if the price or period no longer hold. This operation does not change billing. An upgrade bills the replaced plan’s usage to date and the new plan from now, less the replaced plan’s unused time; planChange says when it applies and which held fixed charges the target does not sell: released first for a change that applies now, released with a downgrade when it applies. additions quotes what is added once an upgrade applies, each billed when it is added, in planChange.additions and outside dueNow. Supply both organizationId and projectId; the organization must pay for the project.
Tags: Organization Billing.
Response 200: What the change would bill.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: FAILED_PRECONDITION: Failed Precondition
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn change_plan(
&self,
idempotency_key: String,
organization_id: String,
project_id: String,
body: &ChangePlanRequest,
) -> Result<ResponseValue<ChangePlanResponse>, Error<ChangePlanError>>
pub async fn change_plan( &self, idempotency_key: String, organization_id: String, project_id: String, body: &ChangePlanRequest, ) -> Result<ResponseValue<ChangePlanResponse>, Error<ChangePlanError>>
Change plan
Purchases or changes the selected project’s plan for the supplied category and planCode. A 202 response means the change is pending: poll the returned operation URL and honor Retry-After until it succeeds or fails. A 200 response means the idempotency key resolved to an operation that is already terminal; inspect that result rather than assuming success from the status code alone. Supply the required Idempotency-Key header. Supply both organizationId and projectId to select the project within its organization.
Tags: Project Billing.
Response 200: The idempotency key resolved to an operation that is already terminal.
Response 202: Plan change accepted. Poll the returned operation until it succeeds or fails.
Response 400: INVALID_ARGUMENT: Invalid Argument; IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: FAILED_PRECONDITION: Failed Precondition; IDEMPOTENCY_REQUEST_IN_PROGRESS: Idempotency Request In Progress
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable; IDEMPOTENCY_UNAVAILABLE: Idempotency Unavailable
UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn get_effective_terms(
&self,
organization_id: String,
project_id: String,
) -> Result<ResponseValue<GetEffectiveTermsResponse>, Error<GetEffectiveTermsError>>
pub async fn get_effective_terms( &self, organization_id: String, project_id: String, ) -> Result<ResponseValue<GetEffectiveTermsResponse>, Error<GetEffectiveTermsError>>
Get the project’s effective billing terms
Returns what the selected project is billed on now, per category it holds: the plan as its subscription has it, with any override applied, each fixed charge at the subscription’s price and quantity, and resolved entitlements; where the plan comes from; how invoices are paid; the current period and next billing date; and any downgrade or cancellation waiting for the period end. It also returns the credit the paying organization holds on credit notes, such as the unused time of a plan an upgrade replaced; it offsets that organization’s next invoices. Supply both organizationId and projectId; the organization must pay for the project. This operation does not change billing.
Tags: Organization Billing.
Response 200: The project’s effective billing terms, per category.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: FAILED_PRECONDITION: Failed Precondition
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn create_organization_setup_intent(
&self,
idempotency_key: String,
organization_id: String,
) -> Result<ResponseValue<CreateOrganizationSetupIntentResponse>, Error<CreateOrganizationSetupIntentError>>
pub async fn create_organization_setup_intent( &self, idempotency_key: String, organization_id: String, ) -> Result<ResponseValue<CreateOrganizationSetupIntentResponse>, Error<CreateOrganizationSetupIntentError>>
Create card setup intent
Creates payment-provider configuration for collecting a card for the selected organization and returns clientSecret and publishableKey. Supply the required Idempotency-Key header. Complete the provider’s card-collection flow separately and avoid logging the returned client secret.
Tags: Organization Billing.
Response 200: Payment-provider client configuration (client secret and publishable key) for capturing the organization’s card.
Response 400: INVALID_ARGUMENT: Invalid Argument; IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: FAILED_PRECONDITION: Failed Precondition
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn list_projects(
&self,
organization_id: String,
params: Option<ListProjectsParams>,
) -> Result<ResponseValue<ProjectPage>, Error<ListProjectsError>>
pub async fn list_projects( &self, organization_id: String, params: Option<ListProjectsParams>, ) -> Result<ResponseValue<ProjectPage>, Error<ListProjectsError>>
List projects
Returns a cursor-paginated page of the active projects in organizationId. Filter using query and the documented creation-time bounds, and navigate with pageSize and pageToken. Project roles are not returned and role is not a supported filter.
Tags: Projects.
Response 200: One page of active projects in the organization.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn create_project(
&self,
idempotency_key: String,
organization_id: String,
body: &CreateProjectRequest,
) -> Result<ResponseValue<CreateProjectResponse>, Error<CreateProjectError>>
pub async fn create_project( &self, idempotency_key: String, organization_id: String, body: &CreateProjectRequest, ) -> Result<ResponseValue<CreateProjectResponse>, Error<CreateProjectError>>
Create project
Creates in the authorized organization. In addition to account credentials, explicitly granted Service Identity API keys and M2M tokens may create projects. Project API keys cannot create projects. Creator and private credential evidence come only from the trusted authorization context. The caller-selected slug is immutable, must be 3 to 63 lowercase ASCII alphanumerics separated by single hyphens, and cannot be reserved or held by any active or deleted project.
Tags: Projects.
Response 201: The created project, ready to use: its billingInitialization is completed or unknown. A replay after setup finished answers here too.
Response 202: The project is created but its billing is still being set up. GET the Location after the Retry-After interval until billingInitialization is completed or unknown; retry_required means setup is being retried, so keep polling.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid; INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: SLUG_TAKEN: Slug Already Taken
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn get_project_closure_status(
&self,
organization_id: String,
project_id: String,
) -> Result<ResponseValue<GetProjectClosureStatusResponse>, Error<GetProjectClosureStatusError>>
pub async fn get_project_closure_status( &self, organization_id: String, project_id: String, ) -> Result<ResponseValue<GetProjectClosureStatusResponse>, Error<GetProjectClosureStatusError>>
Get project closure status
Returns closure progress for projectId within organizationId, including deletionOperationId, domain progress and ready. This read operation does not initiate deletion.
Tags: Projects.
Response 200: Current cleanup and settlement evidence. Project deletion alone does not establish readiness.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: PROJECT_NOT_FOUND: Project Not Found
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn count_projects(
&self,
organization_id: String,
params: Option<CountProjectsParams>,
) -> Result<ResponseValue<ProjectCount>, Error<CountProjectsError>>
pub async fn count_projects( &self, organization_id: String, params: Option<CountProjectsParams>, ) -> Result<ResponseValue<ProjectCount>, Error<CountProjectsError>>
Count projects
Counts the projects the same filter would list. The count is read from the primary, so it is authoritative rather than replica-lagged.
Tags: Projects.
Response 200: The number of matching projects.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn check_project_slug_availability(
&self,
organization_id: String,
slug: String,
) -> Result<ResponseValue<CheckProjectSlugAvailabilityResponse>, Error<CheckProjectSlugAvailabilityError>>
pub async fn check_project_slug_availability( &self, organization_id: String, slug: String, ) -> Result<ResponseValue<CheckProjectSlugAvailabilityResponse>, Error<CheckProjectSlugAvailabilityError>>
Check project 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.
Tags: Projects.
Response 200: Whether the slug can be allocated, and why not.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn list_attachments(
&self,
id: String,
params: Option<ListAttachmentsParams>,
) -> Result<ResponseValue<AttachmentPage>, Error<ListAttachmentsError>>
pub async fn list_attachments( &self, id: String, params: Option<ListAttachmentsParams>, ) -> Result<ResponseValue<AttachmentPage>, Error<ListAttachmentsError>>
List attachments
Lists the Project’s Attachment metadata, with optional time filters.
Tags: Attachments.
Response 200: A page of Project Attachments in the requested order.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn upload_attachment(
&self,
id: String,
content_length: String,
content_type: String,
idempotency_key: String,
body: &Bytes,
) -> Result<ResponseValue<UploadAttachmentResponse>, Error<UploadAttachmentError>>
pub async fn upload_attachment( &self, id: String, content_length: String, content_type: String, idempotency_key: String, body: &Bytes, ) -> Result<ResponseValue<UploadAttachmentResponse>, Error<UploadAttachmentError>>
Upload attachment
Uploads a file and returns its Attachment once ready to download.
Tags: Attachments.
Response 200: The attachment upload had already been committed.
Response 201: The attachment was uploaded and committed.
Response 400: HTTP_ERROR: Request Failed; INVALID_ATTACHMENT_REQUEST: Invalid Attachment Request
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: ATTACHMENT_CONFLICT: Attachment Conflict; ATTACHMENT_UPLOAD_NOT_READY: Attachment Upload Not Ready
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn get_attachment(
&self,
attachment_id: String,
id: String,
) -> Result<ResponseValue<Attachment>, Error<GetAttachmentError>>
pub async fn get_attachment( &self, attachment_id: String, id: String, ) -> Result<ResponseValue<Attachment>, Error<GetAttachmentError>>
Get attachment
Returns an Attachment’s metadata. Use the content endpoint to download its bytes.
Tags: Attachments.
Response 200: The Attachment resource.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ATTACHMENT_NOT_FOUND: Attachment Not Found
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn download_attachment(
&self,
attachment_id: String,
id: String,
) -> Result<ResponseValue<Bytes>, Error<DownloadAttachmentError>>
pub async fn download_attachment( &self, attachment_id: String, id: String, ) -> Result<ResponseValue<Bytes>, Error<DownloadAttachmentError>>
Download attachment
Downloads an Attachment’s bytes. If unavailable after ten seconds, returns ATTACHMENT_NOT_READY with Retry-After: 5.
Tags: Attachments.
Response 200: The Attachment’s raw file bytes. Content-Type identifies the media type of the response.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ATTACHMENT_NOT_FOUND: Attachment Not Found
Response 409: ATTACHMENT_NOT_READY: Attachment Not Ready
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn list_project_platforms(
&self,
id: String,
) -> Result<ResponseValue<ListProjectPlatformsResponse>, Error<ListProjectPlatformsError>>
pub async fn list_project_platforms( &self, id: String, ) -> Result<ResponseValue<ListProjectPlatformsResponse>, Error<ListProjectPlatformsError>>
List project platforms
Lists the platform types available to this project. Every project currently sees the same fixed public contract, answered in-process rather than forwarded, so the list survives an outage of the private service. The project binding exists so that answer can narrow per project without moving the route. Requires the platforms:read permission bound to the project resource in the path.
Tags: Platforms.
Response 200: Every platform type available to the project.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn connect_email_domain(
&self,
idempotency_key: String,
id: String,
body: &ConnectEmailDomainRequest,
) -> Result<ResponseValue<Operation>, Error<ConnectEmailDomainError>>
pub async fn connect_email_domain( &self, idempotency_key: String, id: String, body: &ConnectEmailDomainRequest, ) -> Result<ResponseValue<Operation>, Error<ConnectEmailDomainError>>
Connect email domain
Reserves a normalized DNS domain and starts its durable email-provider setup. The accepted provision consumes one email-domain entitlement slot until it fails, is cancelled, or becomes a live resource; the plan’s email.max_email_domains value sets the project limit. The customer resource does not exist until provider identity and DNS setup reach READY; poll the returned operation for progress. A domain may have only one unfinished provision or live resource globally. Email domains have no additional per-domain charge. The Idempotency-Key is required and permanent: replaying the same key and canonical domain returns the original operation forever. Requires the platforms:write permission bound to the project resource in the path.
Tags: Email domains.
Response 202: The domain was reserved and setup was dispatched. GET the Location after the Retry-After interval until the operation is terminal.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 402: ENTITLEMENT_REQUIRED: Entitlement Required
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: PROJECT_CLOSING: Project Is Closing; EMAIL_DOMAIN_ALREADY_CONNECTED: Email Domain Already Connected; EMAIL_DOMAIN_CAP_EXCEEDED: Email Domain Cap Exceeded
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable; BILLING_NOT_PROVISIONED: Billing Not Provisioned; BILLING_ENTITLEMENTS_PENDING: Billing Entitlements Pending
UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn list_filtered_verification_codes(
&self,
id: String,
params: Option<ListFilteredVerificationCodesParams>,
) -> Result<ResponseValue<FilteredVerificationCodePage>, Error<ListFilteredVerificationCodesError>>
pub async fn list_filtered_verification_codes( &self, id: String, params: Option<ListFilteredVerificationCodesParams>, ) -> Result<ResponseValue<FilteredVerificationCodePage>, Error<ListFilteredVerificationCodesError>>
List filtered verification codes
Lists the verification codes Photon kept from this project’s dedicated lines and numbers. Inbound messages that carry a one-time code are filtered before delivery; this is the record that they arrived, so a quiet line can be told apart from a broken one. It records the receiving line, its platform and when the code arrived — never the code itself. Each entry names the dedicated line or number (resourceId) that received it. Newest first, within an optional inclusive receivedAfter/receivedBefore window. A page may hold fewer than pageSize entries and still return a nextPageToken; only its absence means the end. Filter by platform; to read one line, use its own filtered-otp path. Requires the platforms:read permission bound to the project resource in the path.
Tags: Verification codes.
Response 200: A page of filtered verification codes, newest first.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn count_filtered_verification_codes(
&self,
id: String,
params: Option<CountFilteredVerificationCodesParams>,
) -> Result<ResponseValue<FilteredVerificationCodeCount>, Error<CountFilteredVerificationCodesError>>
pub async fn count_filtered_verification_codes( &self, id: String, params: Option<CountFilteredVerificationCodesParams>, ) -> Result<ResponseValue<FilteredVerificationCodeCount>, Error<CountFilteredVerificationCodesError>>
Count filtered verification codes
Counts the verification codes Photon kept from this project’s dedicated lines and numbers, optionally for one platform. Without receivedAfter and receivedBefore the window is the 30 days before the request; a window longer than 366 days is rejected. The response echoes the window it resolved, so the number always says which period it covers. Requires the platforms:read permission bound to the project resource in the path.
Tags: Verification codes.
Response 200: How many codes were filtered in the resolved window.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn get_project_imessage_platform(
&self,
id: String,
) -> Result<ResponseValue<ProjectPlatformSettings>, Error<GetProjectImessagePlatformError>>
pub async fn get_project_imessage_platform( &self, id: String, ) -> Result<ResponseValue<ProjectPlatformSettings>, Error<GetProjectImessagePlatformError>>
Get project iMessage platform
Reports whether the project is on shared or dedicated iMessage lines, derived from its billing entitlements. Shared mode carries the seat cap. Both say whether a dedicated line requested now would be assigned without waiting. Requires the platforms:read permission bound to the project resource in the path.
Tags: Platforms.
Response 200: The project’s iMessage line mode.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: BILLING_NOT_PROVISIONED: Billing Not Provisioned; BILLING_ENTITLEMENTS_PENDING: Billing Entitlements Pending; UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
List shared line assignments
Lists the project’s shared line assignments, oldest first. Released assignments are excluded unless includeReleased is set. Requires the platforms:read permission bound to the project resource in the path.
Tags: Shared line assignments.
Response 200: A page of shared line assignments.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Create shared line assignment
Maps an end user’s iMessage handle — an E.164 phone number or an email address — onto one of the project’s pooled shared iMessage lines, consuming a seat from the project’s entitlement. The assigned number is allocated by the server. When an email address is supplied in email the user is sent an invite asynchronously to that address; it is never inferred from the handle, and the response never reports whether the send succeeded. Requires the platforms:write permission bound to the project resource in the path.
Tags: Shared line assignments.
Response 201: The created shared line assignment.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: PROJECT_CLOSING: Project Is Closing; IMESSAGE_MODE_DEDICATED: iMessage Mode Is Dedicated; SHARED_LINE_CAP_EXCEEDED: Shared Line Cap Exceeded; ASSIGNMENT_EXISTS: Assignment Exists
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable; BILLING_NOT_PROVISIONED: Billing Not Provisioned; BILLING_ENTITLEMENTS_PENDING: Billing Entitlements Pending; SHARED_LINE_POOL_EXHAUSTED: Shared Line Pool Exhausted
UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Release shared line assignment
Releases a shared line assignment, freeing both its seat and its handle for reassignment. The row is retained for audit and returned with releasedAt set, so repeating the call is safe. Requires the platforms:write permission bound to the project resource in the path.
Tags: Shared line assignments.
Response 200: The released shared line assignment.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ASSIGNMENT_NOT_FOUND: Assignment Not Found
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Get shared line assignment
Reads one shared line assignment. Requires the platforms:read permission bound to the project resource in the path.
Tags: Shared line assignments.
Response 200: The shared line assignment.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ASSIGNMENT_NOT_FOUND: Assignment Not Found
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn provision_imessage_dedicated_line(
&self,
idempotency_key: String,
id: String,
) -> Result<ResponseValue<Operation>, Error<ProvisionImessageDedicatedLineError>>
pub async fn provision_imessage_dedicated_line( &self, idempotency_key: String, id: String, ) -> Result<ResponseValue<Operation>, Error<ProvisionImessageDedicatedLineError>>
Provision dedicated iMessage line
Claims one dedicated iMessage line for the project and enables iMessage on it. Always answers 202 with an operation: dedicated lines are allocated from available capacity, and unavailable capacity causes a wait rather than a failure — this can legitimately stay running for hours, which is exactly why the response is a handle to poll rather than a number. The project’s messaging subscription must grant the dedicated iMessage lines entitlement (imessage_dedicated_lines.can_purchase), and that is checked before capacity is reserved. The line’s own charge starts when a line is claimed; the subscription that grants the entitlement bills on its own terms, which cancelling a request does not change. Waiting requests are served first come, first served. One that is still waiting is cancelled with a reason if the project is deleted (project_deleted) or its plan stops selling dedicated lines (entitlement_lost); while the payer is restricted for overdue payment it keeps waiting. If you no longer want to wait, POST to the operation’s cancel endpoint, which charges nothing for the line. The Idempotency-Key is required and permanent: repeating it returns the same operation forever. A further line always needs a NEW key, including while others are still waiting. Requires the platforms:write permission bound to the project resource in the path.
Tags: Dedicated iMessage lines.
Response 202: The provision was accepted and is running. GET the Location after the Retry-After interval until state is terminal; the response there carries the line once one is claimed.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 402: ENTITLEMENT_REQUIRED: Entitlement Required
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: PROJECT_CLOSING: Project Is Closing
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable; BILLING_NOT_PROVISIONED: Billing Not Provisioned; BILLING_ENTITLEMENTS_PENDING: Billing Entitlements Pending
UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn release_imessage_dedicated_line(
&self,
id: String,
resource_id: String,
) -> Result<ResponseValue<ReleaseImessageDedicatedLineResponse>, Error<ReleaseImessageDedicatedLineError>>
pub async fn release_imessage_dedicated_line( &self, id: String, resource_id: String, ) -> Result<ResponseValue<ReleaseImessageDedicatedLineResponse>, Error<ReleaseImessageDedicatedLineError>>
Release dedicated iMessage line
Removes only iMessage from one dedicated line. Shared Voice is removed only when WhatsApp is absent; if WhatsApp remains, Voice, the resource, ownership, and phone number are preserved. Usually finishes inside this request and answers 200; a slow workflow answers 202 with an operation to poll. Takes no Idempotency-Key because the open iMessage charge period identifies this product tenure.
Tags: Dedicated iMessage lines.
Response 200: The iMessage product and its charge period were removed.
Response 202: The removal is still running. GET the Location after the Retry-After interval.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: RESOURCE_NOT_FOUND: Resource Not Found
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn list_operations(
&self,
id: String,
params: Option<ListOperationsParams>,
) -> Result<ResponseValue<OperationPage>, Error<ListOperationsError>>
pub async fn list_operations( &self, id: String, params: Option<ListOperationsParams>, ) -> Result<ResponseValue<OperationPage>, Error<ListOperationsError>>
List operations
Lists the project’s operations using the same operation representation as creation and GET. The API includes detail.setupUrl only with platforms:write for this project. Results are oldest first — every provision and release it has ever asked for, including the ones still running. This is the entire in-flight view: a resource only appears once it is real, so nothing half-built shows up in the resource list and nothing in flight is missing from this one. Filter by resourceId to get one resource’s whole history, which for a pooled line is every tenure this project has had on it. state is comma-separated; type accepts one operation type and an absent filter means everything, including failed and cancelled operations. endedAfter keeps only operations that finished after that instant, so what failed or was withdrawn recently is one short page. Requires the platforms:read permission bound to the project resource in the path.
Tags: Operations.
Response 200: A page of the project’s operations.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn get_operation(
&self,
id: String,
operation_id: String,
) -> Result<ResponseValue<GetOperationResponse>, Error<GetOperationError>>
pub async fn get_operation( &self, id: String, operation_id: String, ) -> Result<ResponseValue<GetOperationResponse>, Error<GetOperationError>>
Get operation
Reads one operation using the same operation representation as creation and list. The API includes detail.setupUrl only with platforms:write for this project. This is the polling endpoint every asynchronous request here points its Location at, and it resolves from the moment that request is accepted — an operation is committed before its work is dispatched, so there is no window in which the URL 404s. Poll until state is one of succeeded, failed or cancelled, pacing from the Retry-After the accepting response returned. While an email domain waits for DNS, detail always contains the manual records and may additionally contain automaticSetup with a signed provider URL to open separately. Once the operation has produced a resource, the response carries that resource too, so the poll that finishes is also the one that tells you what you got. succeeded means the work is done; billing runs behind it and is not something the caller waits on. Operations are never purged, so a 404 means the id was never this project’s. Requires the platforms:read permission bound to the project resource in the path.
Tags: Operations.
Response 200: The operation, and the resource it produced once one exists. Retry-After is supplied for pending/running campaign and Telegram operations and omitted once terminal.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: OPERATION_NOT_FOUND: Operation Not Found
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn cancel_operation(
&self,
id: String,
operation_id: String,
) -> Result<ResponseValue<Operation>, Error<CancelOperationError>>
pub async fn cancel_operation( &self, id: String, operation_id: String, ) -> Result<ResponseValue<Operation>, Error<CancelOperationError>>
Cancel operation
Withdraws a provision that has not been fulfilled yet. This is an operations action rather than a DELETE, because there is nothing to delete: no resource exists until the work commits. Whether it is accepted depends on the resource type — a dedicated iMessage line may sit waiting on inventory for hours and withdrawing costs nothing, while an SMS number is cancellable during inventory waiting and answers 409 once the workflow commits to its first provider order. Campaign assignment and detachment operations cannot be cancelled in any state. Wait for completion before requesting another change; that new change is not a guaranteed rollback. The output-only cancellable field is a snapshot; the cancellation transaction always checks the current phase under a row lock. A cancel that loses the race against the work finishing also answers 409: the resource exists and is billed for, so what you want then is to release it. Nothing is charged for a cancelled provision — billing runs after the work, so there is never anything to refund. Requires the platforms:write permission bound to the project resource in the path.
Tags: Operations.
Response 200: The cancelled operation.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: OPERATION_NOT_FOUND: Operation Not Found
Response 409: OPERATION_NOT_CANCELLABLE: Operation Not Cancellable
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn list_resources(
&self,
id: String,
params: Option<ListResourcesParams>,
) -> Result<ResponseValue<ResourcePage>, Error<ListResourcesError>>
pub async fn list_resources( &self, id: String, params: Option<ListResourcesParams>, ) -> Result<ResponseValue<ResourcePage>, Error<ListResourcesError>>
List resources
Lists everything the project holds, oldest first, whatever kind of thing it is — one endpoint and one id shape for numbers, dedicated lines and whatever ships next. Nothing half-built appears here: a resource exists only once it is real, so anything still being provisioned is an operation rather than a resource with a pending flag. Filter by type, by ability (which matches only abilities that are currently enabled), and by state — comma-separated, and absent means every state, including retired ones. detail carries a per-type public view: an SMS number’s number, a dedicated line’s number and its per-capability health (imessageHealth, whatsappHealth, each with an overallStatus of available, degraded, unavailable or unknown; imessageHealth also carries account, photonSystemComponents, newConversations, sms and mms, each a status with the cause that decided it: account, photonSystemComponents, or null for the item’s own state). Requires the platforms:read permission bound to the project resource in the path.
Tags: Resources.
Response 200: A page of the project’s resources.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn release_resource(
&self,
id: String,
resource_id: String,
) -> Result<ResponseValue<ReleaseResourceResponse>, Error<ReleaseResourceError>>
pub async fn release_resource( &self, id: String, resource_id: String, ) -> Result<ResponseValue<ReleaseResourceResponse>, Error<ReleaseResourceError>>
Release resource
Gives one resource back, whatever it is. What that means is the resource’s own business: an SMS number goes back to the provider and is retired, a dedicated iMessage line goes back to the shared pool and stays in existence for someone else to claim. Either way the provider is contacted first where there is one, then a single transaction disables every ability, ends the project’s hold and closes the charge period — so a provider that refuses leaves the resource exactly as it was, still owned and still billed. Usually finishes inside this request and answers 200; if the provider is slow it answers 202 and the Location points at the operation to poll. The decrement runs behind the answer either way, so the resource is gone when you are told it is. Takes no Idempotency-Key — releasing the same resource twice is the same request. Releasing one that is already gone answers 404. Requires the platforms:write permission bound to the project resource in the path.
Tags: Resources.
Response 200: The release finished inside this request. The resource is gone.
Response 202: The release is still running at the provider. GET the Location after the Retry-After interval; a terminal answer may arrive on any read.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: RESOURCE_NOT_FOUND: Resource Not Found
Response 409: WHATSAPP_SENDER_CONNECTED: WhatsApp Sender Connected; WHATSAPP_SENDER_PROVISIONING: WhatsApp Sender Provisioning
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn get_resource(
&self,
id: String,
resource_id: String,
) -> Result<ResponseValue<Resource>, Error<GetResourceError>>
pub async fn get_resource( &self, id: String, resource_id: String, ) -> Result<ResponseValue<Resource>, Error<GetResourceError>>
Get resource
Reads one resource the project holds. A released number stays readable and reads retired, because it remains part of this project’s history. A dedicated line given back does NOT: returning it to inventory is what makes it claimable by someone else, so it answers 404 and the operation that returned it is the record that this project once held it. Requires the platforms:read permission bound to the project resource in the path.
Tags: Resources.
Response 200: The resource.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: RESOURCE_NOT_FOUND: Resource Not Found
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn list_resource_filtered_verification_codes(
&self,
id: String,
resource_id: String,
params: Option<ListResourceFilteredVerificationCodesParams>,
) -> Result<ResponseValue<FilteredVerificationCodePage>, Error<ListResourceFilteredVerificationCodesError>>
pub async fn list_resource_filtered_verification_codes( &self, id: String, resource_id: String, params: Option<ListResourceFilteredVerificationCodesParams>, ) -> Result<ResponseValue<FilteredVerificationCodePage>, Error<ListResourceFilteredVerificationCodesError>>
List a line’s filtered verification codes
Lists the verification codes Photon kept from one dedicated line or number. Inbound messages that carry a one-time code are filtered before delivery; this is the record that they arrived, so a quiet line can be told apart from a broken one. It records the receiving line, its platform and when the code arrived — never the code itself. Each entry names the dedicated line or number (resourceId) that received it. Newest first, within an optional inclusive receivedAfter/receivedBefore window. A page may hold fewer than pageSize entries and still return a nextPageToken; only its absence means the end. Answers 404 unless the project holds the resource now. Codes from an earlier tenure stay in the project-wide list. Filter by platform — a number receives both SMS and WhatsApp. Requires the platforms:read permission bound to the project resource in the path.
Tags: Verification codes.
Response 200: A page of filtered verification codes, newest first.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: RESOURCE_NOT_FOUND: Resource Not Found
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn count_resource_filtered_verification_codes(
&self,
id: String,
resource_id: String,
params: Option<CountResourceFilteredVerificationCodesParams>,
) -> Result<ResponseValue<FilteredVerificationCodeCount>, Error<CountResourceFilteredVerificationCodesError>>
pub async fn count_resource_filtered_verification_codes( &self, id: String, resource_id: String, params: Option<CountResourceFilteredVerificationCodesParams>, ) -> Result<ResponseValue<FilteredVerificationCodeCount>, Error<CountResourceFilteredVerificationCodesError>>
Count a line’s filtered verification codes
Counts the verification codes Photon kept from one dedicated line or number. Without receivedAfter and receivedBefore the window is the 30 days before the request; a window longer than 366 days is rejected. The response echoes the window it resolved, so the number always says which period it covers. Answers 404 unless the project holds the resource now. Codes from an earlier tenure stay in the project-wide list. Filter by platform — a number receives both SMS and WhatsApp. Requires the platforms:read permission bound to the project resource in the path.
Tags: Verification codes.
Response 200: How many codes were filtered in the resolved window.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: RESOURCE_NOT_FOUND: Resource Not Found
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn unassign_sms_line_campaign(
&self,
idempotency_key: String,
id: String,
resource_id: String,
expected_version: f64,
) -> Result<ResponseValue<UnassignSmsLineCampaignResponse>, Error<UnassignSmsLineCampaignError>>
pub async fn unassign_sms_line_campaign( &self, idempotency_key: String, id: String, resource_id: String, expected_version: f64, ) -> Result<ResponseValue<UnassignSmsLineCampaignResponse>, Error<UnassignSmsLineCampaignError>>
Unassign SMS line campaign
Any project writer, including a scoped API key, may detach the campaign. The number and campaign remain owned. Requires a permanent Idempotency-Key and expectedVersion. Local eligibility is blocked immediately; provider detachment runs asynchronously.
Tags: SMS campaigns.
Response 200: The original terminal operation on an authorized replay. No Retry-After is emitted.
Response 202: Assignment accepted. Poll the operation Location until terminal.
Response 400: SMS_CAMPAIGN_INVALID_REQUEST: Invalid SMS campaign request; IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch; SMS_CAMPAIGN_ORGANIZATION_MISMATCH: Campaign belongs to another organization
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: SMS_CAMPAIGN_NOT_FOUND: Campaign not found; SMS_LINE_NOT_FOUND: SMS line not found
Response 409: PROJECT_CLOSING: Project Is Closing; SMS_LINE_UNSUPPORTED: SMS line unsupported; SMS_CAMPAIGN_NOT_READY: Campaign not ready; SMS_CAMPAIGN_VERSION_CONFLICT: Assignment version conflict; SMS_CAMPAIGN_CAPACITY_EXCEEDED: Campaign number capacity exhausted; SMS_CAMPAIGN_RECONCILIATION_REQUIRED: Campaign reconciliation required; SMS_CAMPAIGN_MUTATION_IN_PROGRESS: Assignment mutation in progress
Response 422: IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable; SMS_CAMPAIGN_CONTEXT_UNAVAILABLE: Campaign context unavailable
UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn get_sms_line_campaign_assignment(
&self,
id: String,
resource_id: String,
) -> Result<ResponseValue<GetSmsLineCampaignAssignmentResponse>, Error<GetSmsLineCampaignAssignmentError>>
pub async fn get_sms_line_campaign_assignment( &self, id: String, resource_id: String, ) -> Result<ResponseValue<GetSmsLineCampaignAssignmentResponse>, Error<GetSmsLineCampaignAssignmentError>>
Get SMS line campaign assignment
Read the last confirmed campaign and current eligibility. Follow changes through their operations. Eligibility is a control-plane assessment, not a delivery or recipient-consent guarantee.
Tags: SMS campaigns.
Response 200: Current assignment, including an untouched version of 1.
Response 400: SMS_CAMPAIGN_INVALID_REQUEST: Invalid SMS campaign request
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch; SMS_CAMPAIGN_ORGANIZATION_MISMATCH: Campaign belongs to another organization
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: SMS_CAMPAIGN_NOT_FOUND: Campaign not found; SMS_LINE_NOT_FOUND: SMS line not found
Response 409: PROJECT_CLOSING: Project Is Closing; SMS_LINE_UNSUPPORTED: SMS line unsupported; SMS_CAMPAIGN_NOT_READY: Campaign not ready; SMS_CAMPAIGN_VERSION_CONFLICT: Assignment version conflict; SMS_CAMPAIGN_CAPACITY_EXCEEDED: Campaign number capacity exhausted; SMS_CAMPAIGN_RECONCILIATION_REQUIRED: Campaign reconciliation required; SMS_CAMPAIGN_MUTATION_IN_PROGRESS: Assignment mutation in progress
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable; SMS_CAMPAIGN_CONTEXT_UNAVAILABLE: Campaign context unavailable
UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn assign_sms_line_campaign(
&self,
idempotency_key: String,
id: String,
resource_id: String,
body: &AssignSmsLineCampaignRequest,
) -> Result<ResponseValue<AssignSmsLineCampaignResponse>, Error<AssignSmsLineCampaignError>>
pub async fn assign_sms_line_campaign( &self, idempotency_key: String, id: String, resource_id: String, body: &AssignSmsLineCampaignRequest, ) -> Result<ResponseValue<AssignSmsLineCampaignResponse>, Error<AssignSmsLineCampaignError>>
Assign or replace SMS line campaign
Attach a ready campaign from this project’s organization to its line. Requires platforms:write for the project; human and machine actors retain their authenticated identity. Requires a permanent Idempotency-Key and the current assignment version. Provider provisioning runs asynchronously.
Tags: SMS campaigns.
Response 200: The original terminal operation on an authorized replay. No Retry-After is emitted.
Response 202: Assignment accepted. Poll the operation Location until terminal.
Response 400: SMS_CAMPAIGN_INVALID_REQUEST: Invalid SMS campaign request; IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch; SMS_CAMPAIGN_ORGANIZATION_MISMATCH: Campaign belongs to another organization
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: SMS_CAMPAIGN_NOT_FOUND: Campaign not found; SMS_LINE_NOT_FOUND: SMS line not found
Response 409: PROJECT_CLOSING: Project Is Closing; SMS_LINE_UNSUPPORTED: SMS line unsupported; SMS_CAMPAIGN_NOT_READY: Campaign not ready; SMS_CAMPAIGN_VERSION_CONFLICT: Assignment version conflict; SMS_CAMPAIGN_CAPACITY_EXCEEDED: Campaign number capacity exhausted; SMS_CAMPAIGN_RECONCILIATION_REQUIRED: Campaign reconciliation required; SMS_CAMPAIGN_MUTATION_IN_PROGRESS: Assignment mutation in progress
Response 422: IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable; SMS_CAMPAIGN_CONTEXT_UNAVAILABLE: Campaign context unavailable
UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn purchase_sms_number(
&self,
idempotency_key: String,
id: String,
body: &PurchaseSmsNumberRequest,
) -> Result<ResponseValue<Operation>, Error<PurchaseSmsNumberError>>
pub async fn purchase_sms_number( &self, idempotency_key: String, id: String, body: &PurchaseSmsNumberRequest, ) -> Result<ResponseValue<Operation>, Error<PurchaseSmsNumberError>>
Purchase SMS number
Buys one US local number from the provider and records it as a resource with SMS enabled. Requires countryCode (US) and accepts an optional three-digit geographic areaCode. The server selects an exact matching number. Empty inventory keeps the operation running until a number is available or the caller cancels before ordering begins. Always answers 202 with an operation: the work runs behind the response, and the Location points at the operation to poll. New area-specific requests must appear in current provider coverage; discover it with GET /sms/numbers/area-codes?countryCode=US. Coverage and subscription checks run before operation creation. Billing follows delivery. Replays return the original operation without checking current coverage. The Idempotency-Key is required and permanent: repeating it returns the same operation forever, never a second number. A further number always needs a NEW key, including while others are still running. Requires the platforms:write permission bound to the project resource in the path.
Tags: SMS numbers.
Response 202: The purchase was accepted and is running. GET the Location after the Retry-After interval until state is terminal; the response there carries the number once it exists.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 402: ENTITLEMENT_REQUIRED: Entitlement Required
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: PROJECT_CLOSING: Project Is Closing
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable; BILLING_NOT_PROVISIONED: Billing Not Provisioned; BILLING_ENTITLEMENTS_PENDING: Billing Entitlements Pending
UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn list_number_area_codes(
&self,
id: String,
country_code: String,
) -> Result<ResponseValue<ListNumberAreaCodesResponse>, Error<ListNumberAreaCodesError>>
pub async fn list_number_area_codes( &self, id: String, country_code: String, ) -> Result<ResponseValue<ListNumberAreaCodesResponse>, Error<ListNumberAreaCodesError>>
List number area codes
Lists current provider coverage for US local numbers, sorted and deduplicated. Coverage does not guarantee inventory carrying every required feature. New area-specific purchases must use a listed code; accepted purchases keep waiting if coverage later changes. Requires platforms:read for the path project.
Tags: SMS numbers.
Response 200: Current area-code coverage. An empty list is a successful coverage read, not an upstream failure.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn list_number_countries(
&self,
id: String,
) -> Result<ResponseValue<ListNumberCountriesResponse>, Error<ListNumberCountriesError>>
pub async fn list_number_countries( &self, id: String, ) -> Result<ResponseValue<ListNumberCountriesResponse>, Error<ListNumberCountriesError>>
List number countries
Lists supported purchase countries independently of current provider inventory. Requires platforms:read for the path project.
Tags: SMS numbers.
Response 200: Supported countries.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn connect_telegram_bot(
&self,
idempotency_key: String,
id: String,
body: &ConnectTelegramBotRequest,
) -> Result<ResponseValue<Operation>, Error<ConnectTelegramBotError>>
pub async fn connect_telegram_bot( &self, idempotency_key: String, id: String, body: &ConnectTelegramBotRequest, ) -> Result<ResponseValue<Operation>, Error<ConnectTelegramBotError>>
Connect Telegram bot
Starts a free managed Telegram bot connection. Each project may have one unfinished Telegram provision, including user interaction and failure cleanup. A different Idempotency-Key while one is active returns 409 TELEGRAM_PROVISION_IN_PROGRESS with its operationId and operationUrl; resume it, cancel it while cancellation is available, or wait for it to finish. Rejected keys remain reusable. Open detail.setupUrl to connect an existing managed bot or create a new one with the project’s default agent name or a custom display name, then poll Location. The link remains usable while the operation is active and never expires. Replaying the same Idempotency-Key returns the original operation, even after completion or while a newer setup is active. POST, GET and list share the same operation details. The API includes detail.setupUrl only for callers with platforms:write for the project; read-only callers receive the other details unchanged.
Tags: Telegram.
Response 202: Setup accepted. Open detail.setupUrl and poll the operation.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: TELEGRAM_PROJECT_DELETED: Telegram Project Deleted; PROJECT_CLOSING: Project Is Closing; TELEGRAM_PROVISION_IN_PROGRESS: Telegram Provision In Progress
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn batch_update_voice_line_profile_assignments(
&self,
id: String,
body: &BatchUpdateVoiceLineProfileAssignmentsRequest,
) -> Result<ResponseValue<BatchUpdateVoiceLineProfileAssignmentsResponse>, Error<BatchUpdateVoiceLineProfileAssignmentsError>>
pub async fn batch_update_voice_line_profile_assignments( &self, id: String, body: &BatchUpdateVoiceLineProfileAssignmentsRequest, ) -> Result<ResponseValue<BatchUpdateVoiceLineProfileAssignmentsResponse>, Error<BatchUpdateVoiceLineProfileAssignmentsError>>
Batch update Voice line assignments
Atomically sets additional-profile overrides or switches lines back to the project default for up to 100 Voice-capable lines. A null profileId means use the default. Every expected resource version must match or no line changes. Requires platforms:write bound to the path project.
Tags: Voice.
Response 200: The updated line profile assignments.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: RESOURCE_NOT_FOUND: Resource Not Found; VOICE_PROFILE_NOT_FOUND: Voice Profile Not Found
Response 409: PROJECT_CLOSING: Project Is Closing; VOICE_DEFAULT_PROFILE_ASSIGNMENT_FORBIDDEN: Voice Default Profile Assignment Forbidden; VOICE_PROFILE_VERSION_CONFLICT: Voice Profile Version Conflict
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn unassign_voice_line_profile(
&self,
id: String,
resource_id: String,
expected_version: i64,
) -> Result<ResponseValue<()>, Error<UnassignVoiceLineProfileError>>
pub async fn unassign_voice_line_profile( &self, id: String, resource_id: String, expected_version: i64, ) -> Result<ResponseValue<()>, Error<UnassignVoiceLineProfileError>>
Unassign Voice line profile
Removes a line’s explicit override when the resource version matches so the line follows the project default. Profiles and the pstn_voice ability are unchanged. Requires platforms:write bound to the path project.
Tags: Voice.
Response 204: The Voice profile was unassigned.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: RESOURCE_NOT_FOUND: Resource Not Found
Response 409: VOICE_PROFILE_VERSION_CONFLICT: Voice Profile Version Conflict
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn get_voice_line_profile_assignment(
&self,
id: String,
resource_id: String,
) -> Result<ResponseValue<VoiceLineProfileAssignment>, Error<GetVoiceLineProfileAssignmentError>>
pub async fn get_voice_line_profile_assignment( &self, id: String, resource_id: String, ) -> Result<ResponseValue<VoiceLineProfileAssignment>, Error<GetVoiceLineProfileAssignmentError>>
Get Voice line profile assignment
Gets the explicit additional-profile override for an owned Voice-capable line. A line following the project default returns 200 without profileId. Requires platforms:read bound to the path project.
Tags: Voice.
Response 200: The line profile assignment.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: RESOURCE_NOT_FOUND: Resource Not Found
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn assign_voice_line_profile(
&self,
id: String,
resource_id: String,
body: &AssignVoiceLineProfileRequest,
) -> Result<ResponseValue<VoiceLineProfileAssignment>, Error<AssignVoiceLineProfileError>>
pub async fn assign_voice_line_profile( &self, id: String, resource_id: String, body: &AssignVoiceLineProfileRequest, ) -> Result<ResponseValue<VoiceLineProfileAssignment>, Error<AssignVoiceLineProfileError>>
Assign Voice line profile
Assigns or replaces a line’s explicit additional-profile override when the resource version matches. The current default cannot be assigned explicitly. The pstn_voice ability remains the admission source of truth. Requires platforms:write bound to the path project.
Tags: Voice.
Response 200: The updated Voice line profile assignment.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: RESOURCE_NOT_FOUND: Resource Not Found; VOICE_PROFILE_NOT_FOUND: Voice Profile Not Found
Response 409: PROJECT_CLOSING: Project Is Closing; VOICE_DEFAULT_PROFILE_ASSIGNMENT_FORBIDDEN: Voice Default Profile Assignment Forbidden; VOICE_PROFILE_VERSION_CONFLICT: Voice Profile Version Conflict
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn list_voice_profiles(
&self,
id: String,
params: Option<ListVoiceProfilesParams>,
) -> Result<ResponseValue<VoiceProfilePage>, Error<ListVoiceProfilesError>>
pub async fn list_voice_profiles( &self, id: String, params: Option<ListVoiceProfilesParams>, ) -> Result<ResponseValue<VoiceProfilePage>, Error<ListVoiceProfilesError>>
List Voice profiles
Lists reusable Voice profiles in this project. Requires platforms:read bound to the path project.
Tags: Voice.
Response 200: A page of Voice profiles.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn create_voice_profile(
&self,
id: String,
body: &CreateVoiceProfileRequest,
) -> Result<ResponseValue<VoiceProfile>, Error<CreateVoiceProfileError>>
pub async fn create_voice_profile( &self, id: String, body: &CreateVoiceProfileRequest, ) -> Result<ResponseValue<VoiceProfile>, Error<CreateVoiceProfileError>>
Create Voice profile
Creates a direction-neutral additional Voice profile. The project default must already exist. Requires platforms:write bound to the path project.
Tags: Voice.
Response 201: The created Voice profile.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: PROJECT_CLOSING: Project Is Closing; VOICE_DEFAULT_PROFILE_REQUIRED: Voice Default Profile Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn get_default_voice_profile(
&self,
id: String,
) -> Result<ResponseValue<VoiceProfile>, Error<GetDefaultVoiceProfileError>>
pub async fn get_default_voice_profile( &self, id: String, ) -> Result<ResponseValue<VoiceProfile>, Error<GetDefaultVoiceProfileError>>
Get default Voice profile
Gets the profile currently selected as the project default, including its optional inbound delivery state. Requires platforms:read bound to the path project.
Tags: Voice.
Response 200: The current default Voice profile.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: VOICE_PROFILE_NOT_FOUND: Voice Profile Not Found
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn update_default_voice_profile(
&self,
id: String,
body: &UpdateDefaultVoiceProfileRequest,
) -> Result<ResponseValue<VoiceProfile>, Error<UpdateDefaultVoiceProfileError>>
pub async fn update_default_voice_profile( &self, id: String, body: &UpdateDefaultVoiceProfileRequest, ) -> Result<ResponseValue<VoiceProfile>, Error<UpdateDefaultVoiceProfileError>>
Update default Voice profile
Patches the default profile’s protocol or mediaEncryption when expectedVersion matches. Omitted fields are preserved. Its server-assigned name is immutable, and directional configuration uses the profileId returned by this resource. Requires platforms:write bound to the path project.
Tags: Voice.
Response 200: The updated default Voice profile.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: VOICE_PROFILE_NOT_FOUND: Voice Profile Not Found
Response 409: PROJECT_CLOSING: Project Is Closing; VOICE_PROFILE_DIRECTION_CONFIGURED: Voice Profile Direction Configured; VOICE_PROFILE_VERSION_CONFLICT: Voice Profile Version Conflict; VOICE_OUTBOUND_OPERATION_PENDING: Voice Outbound Operation Pending
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn create_default_voice_profile(
&self,
id: String,
body: &CreateDefaultVoiceProfileRequest,
) -> Result<ResponseValue<CreateDefaultVoiceProfileResponse>, Error<CreateDefaultVoiceProfileError>>
pub async fn create_default_voice_profile( &self, id: String, body: &CreateDefaultVoiceProfileRequest, ) -> Result<ResponseValue<CreateDefaultVoiceProfileResponse>, Error<CreateDefaultVoiceProfileError>>
Create default Voice profile
Creates the project default Voice profile when absent. An identical replay returns the existing default without changing its version; a different existing default conflicts. Direction configuration is managed separately. Requires platforms:write bound to the path project.
Tags: Voice.
Response 200: The identically replayed default Voice profile.
Response 201: The created default Voice profile.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: PROJECT_CLOSING: Project Is Closing; VOICE_DEFAULT_PROFILE_EXISTS: Voice Default Profile Exists
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn delete_voice_profile(
&self,
id: String,
profile_id: String,
expected_version: i64,
params: Option<DeleteVoiceProfileParams>,
) -> Result<ResponseValue<()>, Error<DeleteVoiceProfileError>>
pub async fn delete_voice_profile( &self, id: String, profile_id: String, expected_version: i64, params: Option<DeleteVoiceProfileParams>, ) -> Result<ResponseValue<()>, Error<DeleteVoiceProfileError>>
Delete Voice profile
Deletes an additional profile when expectedVersion matches. Assigned profiles require force=true, which atomically removes every stored override so affected lines follow the default. The default can never be deleted. Requires platforms:write bound to the path project.
Tags: Voice.
Response 204: The Voice profile was deleted.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: VOICE_PROFILE_NOT_FOUND: Voice Profile Not Found
Response 409: VOICE_PROFILE_IN_USE: Voice Profile In Use; VOICE_DEFAULT_PROFILE_DELETION_FORBIDDEN: Voice Default Profile Deletion Forbidden; VOICE_PROFILE_VERSION_CONFLICT: Voice Profile Version Conflict
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn get_voice_profile(
&self,
id: String,
profile_id: String,
) -> Result<ResponseValue<VoiceProfile>, Error<GetVoiceProfileError>>
pub async fn get_voice_profile( &self, id: String, profile_id: String, ) -> Result<ResponseValue<VoiceProfile>, Error<GetVoiceProfileError>>
Get Voice profile
Gets one reusable Voice profile, including its optional inbound delivery state. Requires platforms:read bound to the path project.
Tags: Voice.
Response 200: The Voice profile.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: VOICE_PROFILE_NOT_FOUND: Voice Profile Not Found
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn update_voice_profile(
&self,
id: String,
profile_id: String,
body: &UpdateVoiceProfileRequest,
) -> Result<ResponseValue<VoiceProfile>, Error<UpdateVoiceProfileError>>
pub async fn update_voice_profile( &self, id: String, profile_id: String, body: &UpdateVoiceProfileRequest, ) -> Result<ResponseValue<VoiceProfile>, Error<UpdateVoiceProfileError>>
Update Voice profile
Patches an additional profile’s name, protocol, or mediaEncryption when expectedVersion matches. Omitted fields are preserved. Directional configuration is managed through the profile’s inbound and outbound endpoints. Requires platforms:write bound to the path project.
Tags: Voice.
Response 200: The updated Voice profile.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: VOICE_PROFILE_NOT_FOUND: Voice Profile Not Found
Response 409: PROJECT_CLOSING: Project Is Closing; VOICE_PROFILE_DIRECTION_CONFIGURED: Voice Profile Direction Configured; VOICE_PROFILE_VERSION_CONFLICT: Voice Profile Version Conflict; VOICE_OUTBOUND_OPERATION_PENDING: Voice Outbound Operation Pending
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn delete_voice_profile_inbound(
&self,
id: String,
profile_id: String,
expected_version: i64,
) -> Result<ResponseValue<VoiceProfileInboundConfiguration>, Error<DeleteVoiceProfileInboundError>>
pub async fn delete_voice_profile_inbound( &self, id: String, profile_id: String, expected_version: i64, ) -> Result<ResponseValue<VoiceProfileInboundConfiguration>, Error<DeleteVoiceProfileInboundError>>
Delete Voice inbound configuration
Removes a profile’s inbound destination when the shared profile version matches. The profileId may identify the default or an additional profile. The profile and its line assignments remain. Requires platforms:write bound to the path project.
Tags: Voice.
Response 200: The removed inbound configuration and next profile version.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: VOICE_PROFILE_NOT_FOUND: Voice Profile Not Found
Response 409: VOICE_PROFILE_VERSION_CONFLICT: Voice Profile Version Conflict; VOICE_OUTBOUND_OPERATION_PENDING: Voice Outbound Operation Pending
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn update_voice_profile_inbound(
&self,
id: String,
profile_id: String,
body: &UpdateVoiceProfileInboundRequest,
) -> Result<ResponseValue<VoiceProfileInboundConfiguration>, Error<UpdateVoiceProfileInboundError>>
pub async fn update_voice_profile_inbound( &self, id: String, profile_id: String, body: &UpdateVoiceProfileInboundRequest, ) -> Result<ResponseValue<VoiceProfileInboundConfiguration>, Error<UpdateVoiceProfileInboundError>>
Update Voice inbound configuration
Updates selected fields of a profile’s inbound destination when the shared profile version matches. The profileId may identify the default or an additional profile. At least one of destinationUri or credentials is required. Credential omission preserves destination authentication, null removes it, and an object replaces it atomically. Requires platforms:write bound to the path project.
Tags: Voice.
Response 200: The updated inbound configuration and profile version.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: VOICE_PROFILE_NOT_FOUND: Voice Profile Not Found
Response 409: PROJECT_CLOSING: Project Is Closing; VOICE_PROFILE_VERSION_CONFLICT: Voice Profile Version Conflict; VOICE_OUTBOUND_OPERATION_PENDING: Voice Outbound Operation Pending
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn replace_voice_profile_inbound(
&self,
id: String,
profile_id: String,
body: &ReplaceVoiceProfileInboundRequest,
) -> Result<ResponseValue<ReplaceVoiceProfileInboundResponse>, Error<ReplaceVoiceProfileInboundError>>
pub async fn replace_voice_profile_inbound( &self, id: String, profile_id: String, body: &ReplaceVoiceProfileInboundRequest, ) -> Result<ResponseValue<ReplaceVoiceProfileInboundResponse>, Error<ReplaceVoiceProfileInboundError>>
Replace Voice inbound configuration
Creates or fully replaces a profile’s inbound destination when the shared profile version matches. The profileId may identify the default or an additional profile. Credentials are required and nullable; null removes destination authentication. Requires platforms:write bound to the path project.
Tags: Voice.
Response 200: The replaced inbound configuration and profile version.
Response 201: The newly created inbound configuration and profile version.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: VOICE_PROFILE_NOT_FOUND: Voice Profile Not Found
Response 409: PROJECT_CLOSING: Project Is Closing; VOICE_PROFILE_VERSION_CONFLICT: Voice Profile Version Conflict; VOICE_OUTBOUND_OPERATION_PENDING: Voice Outbound Operation Pending
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn delete_voice_profile_outbound(
&self,
id: String,
profile_id: String,
expected_version: i64,
) -> Result<ResponseValue<DeleteVoiceProfileOutboundResponse>, Error<DeleteVoiceProfileOutboundError>>
pub async fn delete_voice_profile_outbound( &self, id: String, profile_id: String, expected_version: i64, ) -> Result<ResponseValue<DeleteVoiceProfileOutboundResponse>, Error<DeleteVoiceProfileOutboundError>>
Revoke Voice outbound credential
Revokes outbound calling for a profile when the shared profile version matches. The profileId may identify the default or an additional profile. The profile, inbound destination, and line assignments remain. Requires platforms:write bound to the path project.
Tags: Voice.
Response 200: Outbound calling was revoked.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: VOICE_PROFILE_NOT_FOUND: Voice Profile Not Found
Response 409: VOICE_PROFILE_VERSION_CONFLICT: Voice Profile Version Conflict; VOICE_OUTBOUND_NOT_CONFIGURED: Voice Outbound Not Configured
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn update_voice_profile_outbound_authentication(
&self,
id: String,
profile_id: String,
body: &UpdateVoiceProfileOutboundAuthenticationRequest,
) -> Result<ResponseValue<UpdateVoiceProfileOutboundAuthenticationResponse>, Error<UpdateVoiceProfileOutboundAuthenticationError>>
pub async fn update_voice_profile_outbound_authentication( &self, id: String, profile_id: String, body: &UpdateVoiceProfileOutboundAuthenticationRequest, ) -> Result<ResponseValue<UpdateVoiceProfileOutboundAuthenticationResponse>, Error<UpdateVoiceProfileOutboundAuthenticationError>>
Update Voice outbound authentication
Changes a SIP profile’s outbound Digest algorithm when expectedVersion matches. The profileId may identify the default or an additional profile. This policy-only change preserves the password, username, and any previous-password grace deadline. SHA-256 is recommended; MD5 is a weaker legacy option. Returns non-secret outbound metadata and the profile version. Requires platforms:write bound to the path project.
Tags: Voice.
Response 200: The current outbound configuration and profile version.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: VOICE_PROFILE_NOT_FOUND: Voice Profile Not Found
Response 409: PROJECT_CLOSING: Project Is Closing; VOICE_PROFILE_VERSION_CONFLICT: Voice Profile Version Conflict; VOICE_OUTBOUND_OPERATION_PENDING: Voice Outbound Operation Pending; VOICE_OUTBOUND_NOT_CONFIGURED: Voice Outbound Not Configured
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn configure_voice_profile_outbound(
&self,
idempotency_key: String,
id: String,
profile_id: String,
body: &ConfigureVoiceProfileOutboundRequest,
) -> Result<ResponseValue<ConfigureVoiceProfileOutboundResponse>, Error<ConfigureVoiceProfileOutboundError>>
pub async fn configure_voice_profile_outbound( &self, idempotency_key: String, id: String, profile_id: String, body: &ConfigureVoiceProfileOutboundRequest, ) -> Result<ResponseValue<ConfigureVoiceProfileOutboundResponse>, Error<ConfigureVoiceProfileOutboundError>>
Configure Voice outbound credential
Configures a SIP credential for outbound calls from a profile when the shared profile version matches. Outbound calls are paid usage, so the organization needs a payment method and no invoices overdue 7 days or more; otherwise this returns 402 ENTITLEMENT_REQUIRED with a reason. authentication.algorithm is required: SHA-256 is recommended, while MD5 is a weaker legacy option supported over UDP, TCP, and TLS; TLS is strongly recommended because UDP and TCP do not encrypt SIP signaling. The profileId may identify the default or an additional profile. The new password is returned once and is never recoverable. Requires platforms:write bound to the path project.
Tags: Voice.
Response 200: An idempotent replay with an explicit null password.
Response 201: The configured outbound connection and display-once password.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 402: ENTITLEMENT_REQUIRED: Entitlement Required
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: VOICE_PROFILE_NOT_FOUND: Voice Profile Not Found
Response 409: PROJECT_CLOSING: Project Is Closing; VOICE_PROFILE_VERSION_CONFLICT: Voice Profile Version Conflict; VOICE_OUTBOUND_OPERATION_PENDING: Voice Outbound Operation Pending; VOICE_OUTBOUND_CONFIGURED: Voice Outbound Already Configured
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn rotate_voice_profile_outbound_credential(
&self,
idempotency_key: String,
id: String,
profile_id: String,
body: &RotateVoiceProfileOutboundCredentialRequest,
) -> Result<ResponseValue<RotateVoiceProfileOutboundCredentialResponse>, Error<RotateVoiceProfileOutboundCredentialError>>
pub async fn rotate_voice_profile_outbound_credential( &self, idempotency_key: String, id: String, profile_id: String, body: &RotateVoiceProfileOutboundCredentialRequest, ) -> Result<ResponseValue<RotateVoiceProfileOutboundCredentialResponse>, Error<RotateVoiceProfileOutboundCredentialError>>
Rotate Voice outbound credential
Rotates a SIP profile’s outbound credential when expectedVersion matches. The profileId may identify the default or an additional profile. Normal rotation gives the previous credential one hour of grace; emergency rotation gives none. The new password is returned once and is never recoverable. Requires platforms:write bound to the path project.
Tags: Voice.
Response 200: The rotated password result and next profile version.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: VOICE_PROFILE_NOT_FOUND: Voice Profile Not Found
Response 409: PROJECT_CLOSING: Project Is Closing; VOICE_PROFILE_VERSION_CONFLICT: Voice Profile Version Conflict; VOICE_OUTBOUND_OPERATION_PENDING: Voice Outbound Operation Pending; VOICE_OUTBOUND_NOT_CONFIGURED: Voice Outbound Not Configured
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn get_project_whatsapp_platform(
&self,
id: String,
) -> Result<ResponseValue<ProjectPlatformSettings>, Error<GetProjectWhatsappPlatformError>>
pub async fn get_project_whatsapp_platform( &self, id: String, ) -> Result<ResponseValue<ProjectPlatformSettings>, Error<GetProjectWhatsappPlatformError>>
Get project WhatsApp platform
Reports whether the project is on shared or dedicated WhatsApp lines, derived from its billing entitlements. Shared mode carries the seat cap. Both say whether a dedicated line requested now would be assigned without waiting. Requires the platforms:read permission bound to the project resource in the path.
Tags: Platforms.
Response 200: The project’s WhatsApp line mode.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: BILLING_NOT_PROVISIONED: Billing Not Provisioned; BILLING_ENTITLEMENTS_PENDING: Billing Entitlements Pending; UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn disconnect_whatsapp_business_account(
&self,
idempotency_key: String,
id: String,
) -> Result<ResponseValue<DisconnectWhatsappBusinessAccountResponse>, Error<DisconnectWhatsappBusinessAccountError>>
pub async fn disconnect_whatsapp_business_account( &self, idempotency_key: String, id: String, ) -> Result<ResponseValue<DisconnectWhatsappBusinessAccountResponse>, Error<DisconnectWhatsappBusinessAccountError>>
Disconnect WhatsApp Business account
Disconnects every attached WhatsApp sender, then unsubscribes our app and removes the project’s business account connection. Photon VoIP lines and the numbers in Meta remain. Requires Idempotency-Key. Poll the returned operation; provider refusals appear as operation failures and retain the account for retry with a new key. New signups are blocked while disconnecting, and existing provisions must finish before this request can be accepted.
Tags: WhatsApp Business.
Response 200: The replayed disconnect operation is terminal.
Response 202: Account disconnect accepted. Poll Location after Retry-After.
Response 400: IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid; IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: WHATSAPP_WABA_NOT_CONNECTED: WhatsApp Business Account Not Connected
Response 409: WHATSAPP_ACCOUNT_DISCONNECTING: WhatsApp Business Account Disconnecting; WHATSAPP_ACCOUNT_PROVISIONING: WhatsApp Business Account Has Provisioning Numbers
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn get_whatsapp_business_account(
&self,
id: String,
) -> Result<ResponseValue<WhatsappBusinessAccount>, Error<GetWhatsappBusinessAccountError>>
pub async fn get_whatsapp_business_account( &self, id: String, ) -> Result<ResponseValue<WhatsappBusinessAccount>, Error<GetWhatsappBusinessAccountError>>
Get WhatsApp Business account
Gets the one WhatsApp Business Account this project has connected, with its number of live senders. Senders are resources and are listed by GET /platforms/resources?ability=whatsapp_business. The account is not a resource and carries no access token. Meta’s retained numbers are listed separately by GET /platforms/whatsapp-business/account/phone-numbers. subscribedAt is absent until our app is attached to the account’s webhooks. Requires the platforms:read permission bound to the project resource in the path.
Tags: WhatsApp Business.
Response 200: The project’s connected account.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: WHATSAPP_WABA_NOT_CONNECTED: WhatsApp Business Account Not Connected
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn list_whatsapp_account_phone_numbers(
&self,
id: String,
) -> Result<ResponseValue<ListWhatsappAccountPhoneNumbersResponse>, Error<ListWhatsappAccountPhoneNumbersError>>
pub async fn list_whatsapp_account_phone_numbers( &self, id: String, ) -> Result<ResponseValue<ListWhatsappAccountPhoneNumbersResponse>, Error<ListWhatsappAccountPhoneNumbersError>>
List WhatsApp account phone numbers
Lists the connected WABA’s phone numbers directly from Meta, including numbers whose Photon sender was disconnected. Ownership is photon for a number in this project’s current Photon inventory and meta otherwise. Match a Photon SMS number by its E.164 phoneNumber and reuse its existing displayName when reconnecting. A null name is unavailable, not permission to choose a new name. A failed lookup returns an error rather than an empty list. Requires platforms:read on the path project.
Tags: WhatsApp Business.
Response 200: The current Meta number inventory for the connected WABA.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: WHATSAPP_WABA_NOT_CONNECTED: WhatsApp Business Account Not Connected
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn create_whatsapp_voip_sender(
&self,
idempotency_key: String,
id: String,
body: &CreateWhatsappVoipSenderRequest,
) -> Result<ResponseValue<Operation>, Error<CreateWhatsappVoipSenderError>>
pub async fn create_whatsapp_voip_sender( &self, idempotency_key: String, id: String, body: &CreateWhatsappVoipSenderRequest, ) -> Result<ResponseValue<Operation>, Error<CreateWhatsappVoipSenderError>>
Create WhatsApp VoIP sender
Registers an active, SMS-capable Photon VoIP line on this project’s connected WhatsApp Business Account. The account is resolved server-side; callers never select a WABA. The platform creates or reuses the Meta number, requests and consumes the SMS ownership code internally, verifies it, and registers the sender. displayName is optional; when omitted the project agent profile name is snapshotted before acceptance. The VoIP line remains a separate resource and never receives the whatsapp_business ability.
Tags: WhatsApp Business.
Response 202: The sender provision was accepted. Poll the Location after Retry-After until the operation is terminal.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 402: ENTITLEMENT_REQUIRED: Entitlement Required
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: WHATSAPP_WABA_NOT_CONNECTED: WhatsApp Business Account Not Connected; WHATSAPP_VOIP_SOURCE_NOT_ELIGIBLE: WhatsApp VoIP Source Not Eligible
Response 409: PROJECT_CLOSING: Project Is Closing; WHATSAPP_ACCOUNT_DISCONNECTING: WhatsApp Business Account Disconnecting; WHATSAPP_ACCOUNT_PROVISIONING: WhatsApp Business Account Has Provisioning Numbers; WHATSAPP_SENDER_CONNECTED: WhatsApp Sender Connected; WHATSAPP_SENDER_PROVISIONING: WhatsApp Sender Provisioning; WHATSAPP_VOIP_SOURCE_RELEASING: WhatsApp VoIP Source Releasing
Response 422: VALIDATION_FAILED: Request Validation Failed; WHATSAPP_DISPLAY_NAME_UNAVAILABLE: WhatsApp Display Name Unavailable; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable; BILLING_NOT_PROVISIONED: Billing Not Provisioned; BILLING_ENTITLEMENTS_PENDING: Billing Entitlements Pending
UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn connect_whatsapp_business(
&self,
idempotency_key: String,
id: String,
body: &ConnectWhatsappBusinessRequest,
) -> Result<ResponseValue<Operation>, Error<ConnectWhatsappBusinessError>>
pub async fn connect_whatsapp_business( &self, idempotency_key: String, id: String, body: &ConnectWhatsappBusinessRequest, ) -> Result<ResponseValue<Operation>, Error<ConnectWhatsappBusinessError>>
Connect WhatsApp Business
Exchanges the authorization code Embedded Signup returned and connects exactly the selected phone number as one whatsapp_sender. Send the WABA id and phone-number id emitted by the same popup attempt; both are treated as selectors and verified against Meta before use. A selected number that matches a non-retired, same-project voip_line is linked to it; a number absent from Photon inventory stays unbound; a matching non-retired cosmos_line, foreign VoIP line or unassigned VoIP line fails the operation before registration. Connecting is free — no plan requirement — but Billing must report the project’s organization as ready with a payment method on file. The Idempotency-Key is required and permanent: replaying the same key returns the original operation forever. Requires the platforms:write permission bound to the project resource in the path.
Tags: WhatsApp Business.
Response 202: The code was accepted and onboarding was dispatched. GET the Location after the Retry-After interval until the operation is terminal.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 402: ENTITLEMENT_REQUIRED: Entitlement Required
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: PROJECT_CLOSING: Project Is Closing
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable; BILLING_NOT_PROVISIONED: Billing Not Provisioned; BILLING_ENTITLEMENTS_PENDING: Billing Entitlements Pending
UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn get_whatsapp_business_verification_code(
&self,
id: String,
resource_id: String,
received_after: DateTime,
) -> Result<ResponseValue<GetWhatsappBusinessVerificationCodeResponse>, Error<GetWhatsappBusinessVerificationCodeError>>
pub async fn get_whatsapp_business_verification_code( &self, id: String, resource_id: String, received_after: DateTime, ) -> Result<ResponseValue<GetWhatsappBusinessVerificationCodeResponse>, Error<GetWhatsappBusinessVerificationCodeError>>
Get WhatsApp Business verification code
Returns the latest six-digit WhatsApp Business ownership code received by SMS for an active Photon VOIP number, but only when its provider timestamp is strictly newer than the required receivedAfter boundary. receivedAfter must be an RFC 3339 timestamp between this request’s arrival time and two minutes before it; once it expires, restart Meta’s verification flow with a new boundary. A missing newer code is a retryable 404 with Retry-After: 2. Poll after 2, 4, 8, then 10 seconds, applying ±20% jitter and capping later intervals at 10 seconds. Stop when the original boundary is two minutes old. Responses are never cached. Requires the platforms:write permission bound to the project resource in the path.
Tags: WhatsApp Business.
Response 200: A verification code received strictly after receivedAfter. Treat it as an authentication secret.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: RESOURCE_NOT_FOUND: Resource Not Found; WHATSAPP_VERIFICATION_CODE_NOT_FOUND: WhatsApp Verification Code Not Found
Response 422: VALIDATION_FAILED: Request Validation Failed; WHATSAPP_VERIFICATION_WINDOW_EXPIRED: WhatsApp Verification Window Expired
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn get_whatsapp_signup_config(
&self,
id: String,
) -> Result<ResponseValue<GetWhatsappSignupConfigResponse>, Error<GetWhatsappSignupConfigError>>
pub async fn get_whatsapp_signup_config( &self, id: String, ) -> Result<ResponseValue<GetWhatsappSignupConfigResponse>, Error<GetWhatsappSignupConfigError>>
Get WhatsApp signup config
Returns what the browser needs to open Meta’s Embedded Signup popup: the Facebook Login for Business configuration id, the Graph version to run against, and the scopes it will request. Answered in-process rather than forwarded, so the first step of onboarding survives an outage of the private service. Pass configId to FB.login as config_id with response_type: 'code' and override_default_response_type: true. Do NOT add a featureType — omitting it is what keeps the phone-number screen in the flow, and only_waba_sharing produces an account with no number that cannot be provisioned. Requires the platforms:read permission bound to the project resource in the path.
Tags: WhatsApp Business.
Response 200: The parameters to launch Embedded Signup with.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout
List WhatsApp shared line assignments
Lists the project’s WhatsApp shared line assignments, oldest first. Released assignments are excluded unless includeReleased is set. Requires the platforms:read permission bound to the project resource in the path.
Tags: WhatsApp shared line assignments.
Response 200: A page of WhatsApp shared line assignments.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Create WhatsApp shared line assignment
Maps an end user’s phone number onto one of the project’s pooled shared WhatsApp lines, consuming a seat from the project’s WhatsApp entitlement. The assigned number is allocated by the server. When an email address is supplied the user is sent an invite asynchronously; the response never reports whether that succeeded. Requires the platforms:write permission bound to the project resource in the path.
Tags: WhatsApp shared line assignments.
Response 201: The created WhatsApp shared line assignment.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: PROJECT_CLOSING: Project Is Closing; WHATSAPP_MODE_DEDICATED: WhatsApp Mode Is Dedicated; SHARED_LINE_CAP_EXCEEDED: Shared Line Cap Exceeded; ASSIGNMENT_EXISTS: Assignment Exists
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable; BILLING_NOT_PROVISIONED: Billing Not Provisioned; BILLING_ENTITLEMENTS_PENDING: Billing Entitlements Pending; SHARED_LINE_POOL_EXHAUSTED: Shared Line Pool Exhausted
UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Release WhatsApp shared line assignment
Releases a WhatsApp shared line assignment, freeing its seat for reassignment. The row is retained for audit and returned with releasedAt set, so repeating the call is safe. Requires the platforms:write permission bound to the project resource in the path.
Tags: WhatsApp shared line assignments.
Response 200: The released WhatsApp shared line assignment.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ASSIGNMENT_NOT_FOUND: Assignment Not Found
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Get WhatsApp shared line assignment
Reads one WhatsApp shared line assignment. Requires the platforms:read permission bound to the project resource in the path.
Tags: WhatsApp shared line assignments.
Response 200: The WhatsApp shared line assignment.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: ASSIGNMENT_NOT_FOUND: Assignment Not Found
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn provision_whatsapp_dedicated_line(
&self,
idempotency_key: String,
id: String,
) -> Result<ResponseValue<Operation>, Error<ProvisionWhatsappDedicatedLineError>>
pub async fn provision_whatsapp_dedicated_line( &self, idempotency_key: String, id: String, ) -> Result<ResponseValue<Operation>, Error<ProvisionWhatsappDedicatedLineError>>
Provision dedicated WhatsApp line
Provisions one dedicated WhatsApp line with WhatsApp and shared Voice enabled. It attaches to an eligible iMessage line the project already owns when possible so both products keep the same number; otherwise it claims healthy, available WhatsApp-capable dedicated-line inventory. Always answers 202, because waiting when no inventory is available is not a failure. The product opens its own charge period after the abilities are enabled; Voice has no separate charge. Waiting requests are served first come, first served, and are cancelled with a reason exactly as for a dedicated iMessage line. Cancel the returned operation to stop waiting. The Idempotency-Key is required and permanent.
Tags: Dedicated WhatsApp lines.
Response 202: The attachment was accepted and is running. GET the Location after the Retry-After interval until state is terminal.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 402: ENTITLEMENT_REQUIRED: Entitlement Required
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: PROJECT_CLOSING: Project Is Closing
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable; BILLING_NOT_PROVISIONED: Billing Not Provisioned; BILLING_ENTITLEMENTS_PENDING: Billing Entitlements Pending
UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn release_whatsapp_dedicated_line(
&self,
id: String,
resource_id: String,
) -> Result<ResponseValue<ReleaseWhatsappDedicatedLineResponse>, Error<ReleaseWhatsappDedicatedLineError>>
pub async fn release_whatsapp_dedicated_line( &self, id: String, resource_id: String, ) -> Result<ResponseValue<ReleaseWhatsappDedicatedLineResponse>, Error<ReleaseWhatsappDedicatedLineError>>
Release dedicated WhatsApp line
Removes only WhatsApp from one dedicated line. Shared Voice is removed only when iMessage is absent; if iMessage remains, Voice, the resource, ownership, and phone number are preserved. Usually finishes inside this request and answers 200; a slow workflow answers 202 with an operation to poll. Takes no Idempotency-Key because the open WhatsApp charge period identifies this product tenure.
Tags: Dedicated WhatsApp lines.
Response 200: The WhatsApp ability and its charge period were removed.
Response 202: The removal is still running. GET the Location after the Retry-After interval.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: RESOURCE_NOT_FOUND: Resource Not Found
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 429: RATE_LIMITED: Too Many Requests
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn delete_project(
&self,
idempotency_key: String,
project_id: String,
) -> Result<ResponseValue<Project>, Error<DeleteProjectError>>
pub async fn delete_project( &self, idempotency_key: String, project_id: String, ) -> Result<ResponseValue<Project>, Error<DeleteProjectError>>
Delete project
Starts deletion of the identified project using a credential authorized for project management. Inspect the documented response and use getProjectClosureStatus with the organization and project identifiers to read closure progress. A project API key is not an accepted credential for this operation.
Tags: Projects.
Response 200: The deleted project tombstone.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: PROJECT_NOT_FOUND: Project Not Found
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn get_project(
&self,
project_id: String,
) -> Result<ResponseValue<Project>, Error<GetProjectError>>
pub async fn get_project( &self, project_id: String, ) -> Result<ResponseValue<Project>, Error<GetProjectError>>
Get project
Returns the identified project’s settings for an authorized caller. The credential must be allowed to access that project; possession of an unrelated project’s key does not provide access. Missing and deleted projects are reported through the documented error responses.
Tags: Projects.
Response 200: The requested project.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: PROJECT_NOT_FOUND: Project Not Found
Response 410: PROJECT_DELETED: Project Deleted
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn update_project(
&self,
idempotency_key: String,
project_id: String,
body: &UpdateProjectRequest,
) -> Result<ResponseValue<Project>, Error<UpdateProjectError>>
pub async fn update_project( &self, idempotency_key: String, project_id: String, body: &UpdateProjectRequest, ) -> Result<ResponseValue<Project>, Error<UpdateProjectError>>
Update project
Updates the identified project’s name and returns the updated project. The project slug is not a mutable field in this request. Use an authorized account or organization service-identity credential; a project API key is not accepted. Supply the required Idempotency-Key header.
Tags: Projects.
Response 200: The updated project.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: PROJECT_NOT_FOUND: Project Not Found
Response 410: PROJECT_DELETED: Project Deleted
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn get_agent_profile(
&self,
project_id: String,
) -> Result<ResponseValue<AgentProfile>, Error<GetAgentProfileError>>
pub async fn get_agent_profile( &self, project_id: String, ) -> Result<ResponseValue<AgentProfile>, Error<GetAgentProfileError>>
Get agent profile
Returns the agent profile belonging to the identified project. The profile is project-scoped and is distinct from the authenticated account’s personal profile. Use the dedicated avatar operations when uploading or removing an agent avatar.
Tags: Agent Profile.
Response 200: The Project’s agent profile.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: PROJECT_NOT_FOUND: Project Not Found
Response 410: PROJECT_DELETED: Project Deleted
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn update_agent_profile(
&self,
idempotency_key: String,
project_id: String,
body: &UpdateAgentProfileRequest,
) -> Result<ResponseValue<AgentProfile>, Error<UpdateAgentProfileError>>
pub async fn update_agent_profile( &self, idempotency_key: String, project_id: String, body: &UpdateAgentProfileRequest, ) -> Result<ResponseValue<AgentProfile>, Error<UpdateAgentProfileError>>
Update agent profile
Updates the supplied firstName and lastName fields in the project’s agent profile and returns the updated profile. Avatar upload, commit and reset are separate operations. The caller must be authorized to change configuration for the selected project. Supply the required Idempotency-Key header.
Tags: Agent Profile.
Response 200: The updated agent profile.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: PROJECT_NOT_FOUND: Project Not Found
Response 410: PROJECT_DELETED: Project Deleted
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn reset_agent_profile_avatar(
&self,
idempotency_key: String,
project_id: String,
) -> Result<ResponseValue<AgentProfile>, Error<ResetAgentProfileAvatarError>>
pub async fn reset_agent_profile_avatar( &self, idempotency_key: String, project_id: String, ) -> Result<ResponseValue<AgentProfile>, Error<ResetAgentProfileAvatarError>>
Reset agent avatar
Replaces the selected project’s agent avatar with the project’s default avatar, a generated planet image derived from the project ID, and returns the updated agent profile. The reset does not restore an earlier avatar: a custom avatar it replaces is discarded and must be uploaded and committed again to use it. When the default avatar is already in use, the profile is returned unchanged. This does not change the account’s personal profile picture. Supply the required Idempotency-Key header.
Tags: Agent Profile.
Response 200: The agent profile with the project’s default avatar.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: PROJECT_NOT_FOUND: Project Not Found
Response 410: PROJECT_DELETED: Project Deleted
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn commit_agent_profile_avatar(
&self,
idempotency_key: String,
project_id: String,
body: &CommitAgentProfileAvatarRequest,
) -> Result<ResponseValue<AgentProfile>, Error<CommitAgentProfileAvatarError>>
pub async fn commit_agent_profile_avatar( &self, idempotency_key: String, project_id: String, body: &CommitAgentProfileAvatarRequest, ) -> Result<ResponseValue<AgentProfile>, Error<CommitAgentProfileAvatarError>>
Commit agent avatar
Commits an agent avatar previously uploaded through createAgentProfileAvatarUpload. Call this only after the direct multipart upload succeeds, using the uploadId from the same upload session and a stable Idempotency-Key. The service validates the temporary object’s Project ownership, size, content type, image bytes, dimensions, encryption, and age before changing the agent profile.
Tags: Agent Profile.
Response 200: The agent profile with its committed avatar.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid; INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: PROJECT_NOT_FOUND: Project Not Found
Response 410: PROJECT_DELETED: Project Deleted
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn create_agent_profile_avatar_upload(
&self,
project_id: String,
body: &CreateAgentProfileAvatarUploadRequest,
) -> Result<ResponseValue<AgentProfileAvatarUpload>, Error<CreateAgentProfileAvatarUploadError>>
pub async fn create_agent_profile_avatar_upload( &self, project_id: String, body: &CreateAgentProfileAvatarUploadRequest, ) -> Result<ResponseValue<AgentProfileAvatarUpload>, Error<CreateAgentProfileAvatarUploadError>>
Create agent avatar upload
Creates a ten-minute, Project-bound presigned S3 POST for a JPEG, PNG, or WebP agent avatar up to 5 MiB. Copy every returned formFields entry into a multipart/form-data request to uploadUrl, append the local file as the final form part, and upload it directly without sending Photon credentials. After the upload succeeds, call commitAgentProfileAvatar with the returned uploadId. Do not cache or log the upload URL or form fields.
Tags: Agent Profile.
Response 201: A short-lived, project-bound presigned S3 POST.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: PROJECT_NOT_FOUND: Project Not Found
Response 410: PROJECT_DELETED: Project Deleted
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn list_project_api_keys(
&self,
project_id: String,
) -> Result<ResponseValue<ListProjectApiKeysResponse>, Error<ListProjectApiKeysError>>
pub async fn list_project_api_keys( &self, project_id: String, ) -> Result<ResponseValue<ListProjectApiKeysResponse>, Error<ListProjectApiKeysError>>
List project API keys
Lists the API keys on the selected project, ordered newest first. Revoked keys are not listed; expired keys stay listed until they are revoked. Entries contain key metadata and permissions, never secret values. Use the returned identifiers to manage an existing key; lost secrets cannot be recovered through this operation.
Tags: API keys.
Response 200: The project’s keys that have not been revoked, newest first. Never includes secrets.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: PROJECT_NOT_FOUND: Project Not Found
Response 410: PROJECT_DELETED: Project Deleted
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn create_project_api_key(
&self,
idempotency_key: String,
project_id: String,
body: &CreateProjectApiKeyRequest,
) -> Result<ResponseValue<CreateProjectApiKeyResponse>, Error<CreateProjectApiKeyError>>
pub async fn create_project_api_key( &self, idempotency_key: String, project_id: String, body: &CreateProjectApiKeyRequest, ) -> Result<ResponseValue<CreateProjectApiKeyResponse>, Error<CreateProjectApiKeyError>>
Create project API key
Creates a key bound to the selected project using the supplied name, permissions and optional expiry. The secret is returned only in this response and in idempotent replays of it; store it securely because other reads never return it. The key is scoped to this project and does not grant account-level access. Supply the required Idempotency-Key header.
Tags: API keys.
Response 201: The created key, with its secret. The secret is returned only in this response and in idempotent replays of it, and cannot be recovered through any other operation.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid; INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: PROJECT_NOT_FOUND: Project Not Found
Response 409: API_KEY_LIMIT_REACHED: API Key Limit Reached
Response 410: PROJECT_DELETED: Project Deleted
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn revoke_project_api_key(
&self,
idempotency_key: String,
api_key_id: String,
project_id: String,
) -> Result<ResponseValue<ProjectApiKeyResponse>, Error<RevokeProjectApiKeyError>>
pub async fn revoke_project_api_key( &self, idempotency_key: String, api_key_id: String, project_id: String, ) -> Result<ResponseValue<ProjectApiKeyResponse>, Error<RevokeProjectApiKeyError>>
Revoke project API key
Revokes the identified key on the selected project and returns its revoked metadata. Repeating the deletion returns the same revokedAt value. This operation does not rotate the key or return a replacement secret. Supply the required Idempotency-Key header.
Tags: API keys.
Response 200: The revoked key. Repeating the delete returns the same revokedAt.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid; INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: PROJECT_NOT_FOUND: Project Not Found; API_KEY_NOT_FOUND: API Key Not Found
Response 410: PROJECT_DELETED: Project Deleted
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn update_project_api_key(
&self,
idempotency_key: String,
api_key_id: String,
project_id: String,
body: &UpdateProjectApiKeyRequest,
) -> Result<ResponseValue<ProjectApiKeyResponse>, Error<UpdateProjectApiKeyError>>
pub async fn update_project_api_key( &self, idempotency_key: String, api_key_id: String, project_id: String, body: &UpdateProjectApiKeyRequest, ) -> Result<ResponseValue<ProjectApiKeyResponse>, Error<UpdateProjectApiKeyError>>
Update project API key permissions
Replaces the identified project key’s permission list with the supplied permissions and returns the updated metadata. Sending the permission list the key already has leaves it unchanged. This request does not create a new secret or change the key’s project binding. Supply the required Idempotency-Key header.
Tags: API keys.
Response 200: The key with its new permission list. Sending the list it already holds returns it unchanged.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid; INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: PROJECT_NOT_FOUND: Project Not Found; API_KEY_NOT_FOUND: API Key Not Found
Response 409: API_KEY_REVOKED: API Key Revoked
Response 410: PROJECT_DELETED: Project Deleted
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn get_billing_overview(
&self,
project_id: String,
) -> Result<ResponseValue<GetBillingOverviewResponse>, Error<GetBillingOverviewError>>
pub async fn get_billing_overview( &self, project_id: String, ) -> Result<ResponseValue<GetBillingOverviewResponse>, Error<GetBillingOverviewError>>
Get project billing overview
Returns the selected project’s plan information, entitlements and current billing-period usage. This operation reads project billing state; it does not change plans or the payer’s payment method. Organization-level plans are available through the organization billing overview.
Tags: Project Billing.
Response 200: Plan, entitlements, and current-period usage.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: FAILED_PRECONDITION: Failed Precondition
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn get_billing_operation(
&self,
project_id: String,
operation_id: String,
) -> Result<ResponseValue<BillingOperation>, Error<GetBillingOperationError>>
pub async fn get_billing_operation( &self, project_id: String, operation_id: String, ) -> Result<ResponseValue<BillingOperation>, Error<GetBillingOperationError>>
Get billing operation
Returns the authoritative state of a billing operation belonging to the selected project. Use it to recover or poll a plan-change request until the operation reaches success or failure. An accepted request is not evidence that the plan change has completed.
Tags: Project Billing.
Response 200: Authoritative recovery snapshot for a billing operation.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: OPERATION_NOT_FOUND: Operation Not Found
Response 409: FAILED_PRECONDITION: Failed Precondition
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn list_billing_plans(
&self,
project_id: String,
) -> Result<ResponseValue<ListBillingPlansResponse>, Error<ListBillingPlansError>>
pub async fn list_billing_plans( &self, project_id: String, ) -> Result<ResponseValue<ListBillingPlansResponse>, Error<ListBillingPlansError>>
List billing plans
Lists the billing plan catalog, grouped by their public plan-metadata type. Use the returned plan information when choosing the category and planCode for a plan change. The catalog is the same for every project, and reading it does not purchase a plan.
Tags: Project Billing.
Response 200: Billing plans grouped by their public plan-metadata type.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: FAILED_PRECONDITION: Failed Precondition
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INVALID_AUTH_CONTEXT: Invalid Authentication Context
INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn get_message_metrics_backfill(
&self,
project_id: String,
params: Option<GetMessageMetricsBackfillParams>,
) -> Result<ResponseValue<GetMessageMetricsBackfillResponse>, Error<GetMessageMetricsBackfillError>>
pub async fn get_message_metrics_backfill( &self, project_id: String, params: Option<GetMessageMetricsBackfillParams>, ) -> Result<ResponseValue<GetMessageMetricsBackfillResponse>, Error<GetMessageMetricsBackfillError>>
Get metrics backfill status
Returns historical metrics update progress. Completion reflects lastVerifiedAt; queries remain available during updates.
Tags: Messaging & Voice Metrics.
Response 200: Project-scoped backfill progress.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 500: INTERNAL_ERROR: Internal Server Error
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Sourcepub async fn get_message_metrics_sql_schema(
&self,
project_id: String,
params: Option<GetMessageMetricsSqlSchemaParams>,
) -> Result<ResponseValue<GetMessageMetricsSqlSchemaResponse>, Error<GetMessageMetricsSqlSchemaError>>
pub async fn get_message_metrics_sql_schema( &self, project_id: String, params: Option<GetMessageMetricsSqlSchemaParams>, ) -> Result<ResponseValue<GetMessageMetricsSqlSchemaResponse>, Error<GetMessageMetricsSqlSchemaError>>
Get metrics SQL schema
Returns the message_events and call_events SQL schema, supported queries, and limits for the selected API version.
Tags: Messaging & Voice Metrics.
Response 200: The Project-scoped SQL surface of the resolved contracts date.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 500: INTERNAL_ERROR: Internal Server Error
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Sourcepub async fn query_message_metrics(
&self,
project_id: String,
params: Option<QueryMessageMetricsParams>,
body: &ClickHouseSqlQueryRequest,
) -> Result<ResponseValue<QueryMessageMetricsResponse>, Error<QueryMessageMetricsError>>
pub async fn query_message_metrics( &self, project_id: String, params: Option<QueryMessageMetricsParams>, body: &ClickHouseSqlQueryRequest, ) -> Result<ResponseValue<QueryMessageMetricsResponse>, Error<QueryMessageMetricsError>>
Query metrics
Runs read-only SQL over the Project’s message_events or call_events table. Get the SQL schema for supported columns, capabilities, and limits.
Tags: Messaging & Voice Metrics.
Response 200: Dynamic SQL columns and rows followed by bounded ClickHouse read statistics.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: QUERY_RESOURCE_LIMIT: Query Resource Limit; VALIDATION_FAILED: Request Validation Failed
Response 429: QUERY_CONCURRENCY_LIMIT: Query Concurrency Limit
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: UPSTREAM_TIMEOUT: Upstream Service Timeout; REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn list_webhook_api_versions(
&self,
project_id: String,
) -> Result<ResponseValue<ListWebhookApiVersionsResponse>, Error<ListWebhookApiVersionsError>>
pub async fn list_webhook_api_versions( &self, project_id: String, ) -> Result<ResponseValue<ListWebhookApiVersionsResponse>, Error<ListWebhookApiVersionsError>>
List webhook API versions
Lists the published webhook payload API versions and their lifecycle metadata. The list is the same for every project. Use the selectable indicator when choosing a version for a destination. These payload dates are separate from SDK package versions. An authorized conditional request may return 304 without a response body.
Tags: Webhook Event Catalog.
Response 200: Published webhook payload API versions.
Response 304: The authorized cached representation is current; no response body.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn list_webhook_destinations(
&self,
project_id: String,
params: Option<ListWebhookDestinationsParams>,
) -> Result<ResponseValue<WebhookDestinationPage>, Error<ListWebhookDestinationsError>>
pub async fn list_webhook_destinations( &self, project_id: String, params: Option<ListWebhookDestinationsParams>, ) -> Result<ResponseValue<WebhookDestinationPage>, Error<ListWebhookDestinationsError>>
List webhook destinations
Returns a cursor-paginated page of active webhook destinations configured for the selected project. Use pageSize and pageToken to navigate it. The listing returns destination configuration, never signing secrets.
Tags: Webhook Destinations.
Response 200: One page of active webhook destinations.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn create_webhook_destination(
&self,
idempotency_key: String,
project_id: String,
body: &CreateWebhookDestinationRequest,
) -> Result<ResponseValue<CreateWebhookDestinationResponse>, Error<CreateWebhookDestinationError>>
pub async fn create_webhook_destination( &self, idempotency_key: String, project_id: String, body: &CreateWebhookDestinationRequest, ) -> Result<ResponseValue<CreateWebhookDestinationResponse>, Error<CreateWebhookDestinationError>>
Create webhook destination
Creates a webhook destination for the selected project using its URL, payload API version, event selection and other documented settings. The response includes the signing secret, which is returned only in this response and in idempotent replays of it, never by destination reads; store it securely for signature verification. The API version must be selectable and selected event types must belong to that version’s catalog. Supply the required Idempotency-Key header.
Tags: Webhook Destinations.
Response 201: The created destination and its signing secret.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid; INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn delete_webhook_destination(
&self,
destination_id: String,
project_id: String,
) -> Result<ResponseValue<WebhookDestination>, Error<DeleteWebhookDestinationError>>
pub async fn delete_webhook_destination( &self, destination_id: String, project_id: String, ) -> Result<ResponseValue<WebhookDestination>, Error<DeleteWebhookDestinationError>>
Delete webhook destination
Deletes the selected project’s destination and returns its stable tombstone. Repeated deletion returns the deletion representation. This operation removes the destination configuration; it is separate from disabling a destination through an update.
Tags: Webhook Destinations.
Response 200: The stable webhook destination tombstone.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: WEBHOOK_DESTINATION_NOT_FOUND: Webhook Destination Not Found
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn get_webhook_destination(
&self,
destination_id: String,
project_id: String,
) -> Result<ResponseValue<WebhookDestination>, Error<GetWebhookDestinationError>>
pub async fn get_webhook_destination( &self, destination_id: String, project_id: String, ) -> Result<ResponseValue<WebhookDestination>, Error<GetWebhookDestinationError>>
Get webhook destination
Returns the configuration of one webhook destination belonging to the selected project. Missing or deleted destinations are reported as errors. This read does not disclose the signing secret returned when the destination or a secret rotation was created.
Tags: Webhook Destinations.
Response 200: The requested webhook destination.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: WEBHOOK_DESTINATION_NOT_FOUND: Webhook Destination Not Found
Response 410: WEBHOOK_DESTINATION_DELETED: Webhook Destination Deleted
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn update_webhook_destination(
&self,
idempotency_key: String,
destination_id: String,
project_id: String,
body: &UpdateWebhookDestinationRequest,
) -> Result<ResponseValue<WebhookDestination>, Error<UpdateWebhookDestinationError>>
pub async fn update_webhook_destination( &self, idempotency_key: String, destination_id: String, project_id: String, body: &UpdateWebhookDestinationRequest, ) -> Result<ResponseValue<WebhookDestination>, Error<UpdateWebhookDestinationError>>
Update webhook destination
Updates the supplied URL, name, description, status or enabledEvents fields on a project’s webhook destination and returns its updated configuration. The payload API version is not a mutable field in this request. Event selections are checked against the destination’s versioned catalog; signing-secret rotation is a separate operation. Supply the required Idempotency-Key header.
Tags: Webhook Destinations.
Response 200: The updated webhook destination.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid; INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: WEBHOOK_DESTINATION_NOT_FOUND: Webhook Destination Not Found
Response 410: WEBHOOK_DESTINATION_DELETED: Webhook Destination Deleted
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn retry_webhook_delivery(
&self,
idempotency_key: String,
destination_id: String,
project_id: String,
body: &RetryWebhookDeliveryRequest,
) -> Result<ResponseValue<RetryWebhookDeliveryResponse>, Error<RetryWebhookDeliveryError>>
pub async fn retry_webhook_delivery( &self, idempotency_key: String, destination_id: String, project_id: String, body: &RetryWebhookDeliveryRequest, ) -> Result<ResponseValue<RetryWebhookDeliveryResponse>, Error<RetryWebhookDeliveryError>>
Retry webhook delivery
Requests an immediate attempt of the selected delivery if it is still the waiting head for its destination and event type. expectedAttemptCount is the failed-attempt counter recorded on the delivery and fences stale requests. This overrides the current backoff, including Retry-After, once. It preserves event identity and the retry budget. Delivered, active, disabled and dead-lettered deliveries cannot be retried. A 202 acknowledges the wake-up, not successful delivery. Supply an Idempotency-Key and retain it when retrying an ambiguous failure.
Tags: Webhook Delivery.
Response 202: The waiting delivery was made eligible for an immediate attempt.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 409: FAILED_PRECONDITION: Failed Precondition
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn rotate_webhook_signing_secret(
&self,
idempotency_key: String,
destination_id: String,
project_id: String,
body: &RotateWebhookSigningSecretRequest,
) -> Result<ResponseValue<RotateWebhookSigningSecretResponse>, Error<RotateWebhookSigningSecretError>>
pub async fn rotate_webhook_signing_secret( &self, idempotency_key: String, destination_id: String, project_id: String, body: &RotateWebhookSigningSecretRequest, ) -> Result<ResponseValue<RotateWebhookSigningSecretResponse>, Error<RotateWebhookSigningSecretError>>
Rotate webhook signing secret
Rotates the signing secret for the selected project’s webhook destination and returns the new secret. The optional overlapSeconds controls the requested overlap with the previous secret according to the documented request constraints. Store the new secret securely and update the receiver’s signature verification configuration; it is returned only in this response and in idempotent replays of it, never by destination reads. Supply the required Idempotency-Key header.
Tags: Webhook Destinations.
Response 200: The new signing secret.
Response 400: IDEMPOTENCY_KEY_REQUIRED: Idempotency Key Required; IDEMPOTENCY_KEY_INVALID: Idempotency Key Invalid; INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 404: WEBHOOK_DESTINATION_NOT_FOUND: Webhook Destination Not Found
Response 410: WEBHOOK_DESTINATION_DELETED: Webhook Destination Deleted
Response 413: PAYLOAD_TOO_LARGE: Payload Too Large
Response 422: VALIDATION_FAILED: Request Validation Failed; IDEMPOTENCY_KEY_REUSED: Idempotency Key Reused
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn list_webhook_egress_addresses(
&self,
project_id: String,
) -> Result<ResponseValue<ListWebhookEgressAddressesResponse>, Error<ListWebhookEgressAddressesError>>
pub async fn list_webhook_egress_addresses( &self, project_id: String, ) -> Result<ResponseValue<ListWebhookEgressAddressesResponse>, Error<ListWebhookEgressAddressesError>>
List webhook egress addresses
Returns the public network addresses from which this environment sends webhook deliveries. Use this information when configuring the receiving system’s network allowlist. The result is environment-specific and does not describe the API service’s ingress addresses.
Tags: Webhook Delivery.
Response 200: The public addresses webhook deliveries originate from in this environment.
Response 304: The authorized cached representation is current; no response body.
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INTERNAL_ERROR: Internal Server Error
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout
Sourcepub async fn list_webhook_event_types(
&self,
project_id: String,
api_version: Date,
) -> Result<ResponseValue<ListWebhookEventTypesResponse>, Error<ListWebhookEventTypesError>>
pub async fn list_webhook_event_types( &self, project_id: String, api_version: Date, ) -> Result<ResponseValue<ListWebhookEventTypesResponse>, Error<ListWebhookEventTypesError>>
List webhook event types
Lists the webhook event types available in the requested apiVersion, including their descriptions, audiences and reader-schema URLs. Use this versioned catalog when selecting a destination’s enabledEvents. The response may include version-retirement information; an authorized conditional request can return 304 without a body.
Tags: Webhook Event Catalog.
Response 200: Events available in the selected API version.
Response 304: The authorized cached representation is current; no response body.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout
Sourcepub async fn get_webhook_event_schema(
&self,
project_id: String,
event_type: String,
api_version: Date,
) -> Result<ResponseValue<GetWebhookEventSchemaResponse>, Error<GetWebhookEventSchemaError>>
pub async fn get_webhook_event_schema( &self, project_id: String, event_type: String, api_version: Date, ) -> Result<ResponseValue<GetWebhookEventSchemaResponse>, Error<GetWebhookEventSchemaError>>
Get webhook event schema
Returns the published reader JSON Schema for eventType in the requested webhook apiVersion. Use it to interpret events for that exact payload version. The response media type is application/schema+json; an authorized conditional request may return 304 without a body. Unsupported event/version combinations are rejected.
Tags: Webhook Event Catalog.
Response 200: The published reader JSON Schema for the event.
Response 304: The authorized cached representation is current; no response body.
Response 400: INVALID_ARGUMENT: Invalid Argument
Response 401: NOT_AUTHENTICATED: Not Authenticated
Response 403: FORBIDDEN: Forbidden; RESOURCE_MISMATCH: Resource Mismatch
FORBIDDEN: Forbidden; INSUFFICIENT_SCOPE: Insufficient Scope; ORGANIZATION_SSO_REQUIRED: Organization SSO Required
Response 422: VALIDATION_FAILED: Request Validation Failed
Response 500: INTERNAL_ERROR: Internal Server Error
Response 502: UPSTREAM_FAILURE: Upstream Service Failure
Response 503: UPSTREAM_UNAVAILABLE: Upstream Service Unavailable
Response 504: REQUEST_TIMEOUT: Request Timeout; UPSTREAM_TIMEOUT: Upstream Service Timeout