Skip to main content
Contents

Authentication and API tokens

Sessions of the customer portal, two-factor authentication, account sign-up and API tokens. Most of these operations accept only a signed-in session.

Examples marked as generated are built from the schema with synthetic values.

GET/api/v2/auth/session

Current session

Returns the signed-in user, the active organization, its capabilities and the state of the second factor.

Authentication
Portal session only
Required permission
Not declared in the contract

Responses

  • 200OKapplication/json

    Fields (21)
    Responses getSession 200
    FieldTypeRequiredRules
    userobjectYes
    user.idstringYes
    user.emailstringYes
    user.namestringYes
    • Can be null
    user.localestringYes
    • One of: en, es
    • Can be null
    user.timezonestringYes
    • Can be null
    user.mfa_enabledbooleanYes
    organization_idstringYes
    organizationsarray<object>Yes
    organizations[].idstringYes
    organizations[].namestringYes
    organizations[].typestringYes
    • One of: platform, reseller, customer
    organizations[].rolestringYes
    permissionsarray<string>Yes
    platform_rolesarray<string>Yes
    mfaobjectYes
    mfa.requiredbooleanYes
    mfa.satisfiedbooleanYes
    impersonationobjectYes
    impersonation.activebooleanYes
    impersonation.expires_atstringYes
    • Format: date-time
    • Can be null
    Example (generated from the schema)
    {
      "user": {
        "id": "id_example",
        "email": "user@example.test",
        "name": "Example",
        "locale": "en",
        "timezone": "UTC",
        "mfa_enabled": false
      },
      "organization_id": "organization_example",
      "organizations": [
        {
          "id": "org_u0123456789",
          "name": "Example",
          "type": "platform",
          "role": "owner"
        }
      ],
      "permissions": [
        "string"
      ],
      "platform_roles": [
        "string"
      ],
      "mfa": {
        "required": false,
        "satisfied": false
      },
      "impersonation": {
        "active": false,
        "expires_at": "2026-01-15T10:00:00Z"
      }
    }
  • 401Unauthorizedapplication/problem+json

    Headers: WWW-Authenticate

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/unauthenticated",
      "title": "Authentication required",
      "status": 401,
      "code": "unauthenticated",
      "request_id": "req_01EXAMPLE00000000000000000"
    }

Used by the customer portal with a signed-in session. API tokens cannot call it, so there is no curl example.

POST/api/v2/auth/login

Sign in

Starts a portal session with an e-mail address and a password. When the account has a second factor, the answer asks for it. Every failure answers invalid_credentials, without saying why.

Authentication
None

Request body

Content types: application/json

Request body login
FieldTypeRequiredRules
emailstringYes
  • At most 1024 characters
passwordstringYes
  • At most 1024 characters
  • Write only, never returned
Example (generated from the schema)
{
  "email": "user@example.test",
  "password": "example-password"
}

Responses

  • 200OKapplication/json

    Headers: Set-Cookie

    Fields (1)
    Responses login 200
    FieldTypeRequiredRules
    statusstringYes
    • One of: authenticated, mfa_required, mfa_enrollment_required, password_reset_required
    Example (generated from the schema)
    {
      "status": "authenticated"
    }
  • 401Unauthorizedapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/invalid_credentials",
      "title": "Invalid credentials",
      "status": 401,
      "code": "invalid_credentials",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 422Unprocessable contentapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/validation_failed",
      "title": "Validation failed",
      "status": 422,
      "code": "validation_failed",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 429Too many requestsapplication/problem+json

    Headers: Retry-After

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/rate_limited",
      "title": "Too many requests",
      "status": 429,
      "code": "rate_limited",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
curl
curl -X POST 'https://api.cdnify.lat/api/v2/auth/login' \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.test","password":"example-password"}'
POST/api/v2/auth/logout

Sign out

Ends the portal session. Repeating it is harmless.

Authentication
Portal session only
Required permission
Not declared in the contract

Request body

Content types: application/json

Body: object

Example (generated from the schema)
{}

Responses

Used by the customer portal with a signed-in session. API tokens cannot call it, so there is no curl example.

POST/api/v2/auth/password-reset

Request a password reset

Sends a reset link by e-mail. The answer is the same whether or not the address has an account.

Authentication
None

Request body

Content types: application/json

Request body requestPasswordReset
FieldTypeRequiredRules
emailstringYes
  • At most 1024 characters
Example (generated from the schema)
{
  "email": "user@example.test"
}

Responses

  • 202Accepted

  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 422Unprocessable contentapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/validation_failed",
      "title": "Validation failed",
      "status": 422,
      "code": "validation_failed",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 429Too many requestsapplication/problem+json

    Headers: Retry-After

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/rate_limited",
      "title": "Too many requests",
      "status": 429,
      "code": "rate_limited",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
curl
curl -X POST 'https://api.cdnify.lat/api/v2/auth/password-reset' \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.test"}'
POST/api/v2/auth/password-reset/complete

Reset the password

Sets a new password with the one-time token from the reset e-mail. Every session of the user ends.

Authentication
None

Request body

Content types: application/json

Request body completePasswordReset
FieldTypeRequiredRules
tokenstringYes
  • At most 1024 characters
  • Write only, never returned
passwordstringYes
  • At most 1024 characters
  • Write only, never returned
Example (generated from the schema)
{
  "token": "example-one-time-token",
  "password": "example-password"
}

Responses

  • 204No content

  • 400Bad requestapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/token_invalid",
      "title": "Link invalid or expired",
      "status": 400,
      "code": "token_invalid",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 422Unprocessable contentapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/validation_failed",
      "title": "Validation failed",
      "status": 422,
      "code": "validation_failed",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 429Too many requestsapplication/problem+json

    Headers: Retry-After

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/rate_limited",
      "title": "Too many requests",
      "status": 429,
      "code": "rate_limited",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
curl
curl -X POST 'https://api.cdnify.lat/api/v2/auth/password-reset/complete' \
  -H "Content-Type: application/json" \
  -d '{"token":"example-one-time-token","password":"example-password"}'
POST/api/v2/auth/mfa/verify

Verify the second factor

Completes a sign-in with a TOTP code or a recovery code.

Authentication
Portal session only
Required permission
Not declared in the contract

Request body

Content types: application/json

Request body verifyMfa
FieldTypeRequiredRules
methodstringYes
  • One of: totp, recovery_code
codestringYes
  • At most 64 characters
  • Write only, never returned
Example (generated from the schema)
{
  "method": "totp",
  "code": "string"
}

Responses

  • 200OKapplication/json

    Headers: Set-Cookie

    Fields (1)
    Responses verifyMfa 200
    FieldTypeRequiredRules
    statusstringYes
    • One of: authenticated, mfa_required, mfa_enrollment_required, password_reset_required
    Example (generated from the schema)
    {
      "status": "authenticated"
    }
  • 401Unauthorizedapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/invalid_credentials",
      "title": "Invalid credentials",
      "status": 401,
      "code": "invalid_credentials",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 409Conflictapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/alias_in_use",
      "title": "Site name already in use",
      "status": 409,
      "code": "alias_in_use",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 422Unprocessable contentapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/validation_failed",
      "title": "Validation failed",
      "status": 422,
      "code": "validation_failed",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 429Too many requestsapplication/problem+json

    Headers: Retry-After

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/rate_limited",
      "title": "Too many requests",
      "status": 429,
      "code": "rate_limited",
      "request_id": "req_01EXAMPLE00000000000000000"
    }

Used by the customer portal with a signed-in session. API tokens cannot call it, so there is no curl example.

POST/api/v2/auth/reauthenticate

Confirm your identity

Confirms your identity again before a sensitive action, such as creating an API token. Operations that need it answer reauthentication_required until you do.

Authentication
Portal session only
Required permission
Not declared in the contract

Request body

Content types: application/json

Request body reauthenticate
FieldTypeRequiredRules
methodstringYes
  • One of: totp, recovery_code, password
codestringNo
  • At most 64 characters
  • Write only, never returned
passwordstringNo
  • At most 1024 characters
  • Write only, never returned
Example (generated from the schema)
{
  "method": "totp",
  "code": "string",
  "password": "example-password"
}

Responses

  • 200OKapplication/json

    Headers: Set-Cookie

    Fields (2)
    Responses reauthenticate 200
    FieldTypeRequiredRules
    statusstringYes
    • One of: authenticated
    recent_untilstringYes
    • Format: date-time
    Example (generated from the schema)
    {
      "status": "authenticated",
      "recent_until": "2026-01-15T10:00:00Z"
    }
  • 401Unauthorizedapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/invalid_credentials",
      "title": "Invalid credentials",
      "status": 401,
      "code": "invalid_credentials",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 422Unprocessable contentapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/validation_failed",
      "title": "Validation failed",
      "status": 422,
      "code": "validation_failed",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 429Too many requestsapplication/problem+json

    Headers: Retry-After

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/rate_limited",
      "title": "Too many requests",
      "status": 429,
      "code": "rate_limited",
      "request_id": "req_01EXAMPLE00000000000000000"
    }

Used by the customer portal with a signed-in session. API tokens cannot call it, so there is no curl example.

POST/api/v2/auth/mfa/totp

Start TOTP enrollment

Creates an authenticator app (TOTP) factor and returns its secret once, to add it to the app.

Authentication
Portal session only
Required permission
Not declared in the contract

Request body

Content types: application/json

Request body beginTotpEnrollment
FieldTypeRequiredRules
namestringYes
  • At least 1 characters
  • At most 64 characters
Example (generated from the schema)
{
  "name": "Example"
}

Responses

  • 201Createdapplication/json

    Fields (3)
    Responses beginTotpEnrollment 201
    FieldTypeRequiredRules
    factor_idstringYes
    secretstringYes
    otpauth_uristringYes
    Example (generated from the schema)
    {
      "factor_id": "factor_example",
      "secret": "example-secret-shown-once",
      "otpauth_uri": "string"
    }
  • 401Unauthorizedapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/invalid_credentials",
      "title": "Invalid credentials",
      "status": 401,
      "code": "invalid_credentials",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 422Unprocessable contentapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/validation_failed",
      "title": "Validation failed",
      "status": 422,
      "code": "validation_failed",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 503Service unavailableapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/service_unavailable",
      "title": "Service unavailable",
      "status": 503,
      "code": "service_unavailable",
      "request_id": "req_01EXAMPLE00000000000000000"
    }

Used by the customer portal with a signed-in session. API tokens cannot call it, so there is no curl example.

POST/api/v2/auth/mfa/totp/{factor_id}/confirm

Confirm TOTP enrollment

Activates the new factor with a first code. For the first factor, the answer includes the recovery codes, shown once.

Authentication
Portal session only
Required permission
Not declared in the contract

Parameters

Parameters confirmTotpEnrollment
NameInTypeRequiredRules
factor_idPathstringYes
  • At most 64 characters

Request body

Content types: application/json

Request body confirmTotpEnrollment
FieldTypeRequiredRules
codestringYes
  • At most 16 characters
  • Write only, never returned
Example (generated from the schema)
{
  "code": "string"
}

Responses

  • 200OKapplication/json

    Fields (1)
    Responses confirmTotpEnrollment 200
    FieldTypeRequiredRules
    recovery_codesarray<string>Yes
    Example (generated from the schema)
    {
      "recovery_codes": [
        "string"
      ]
    }
  • 401Unauthorizedapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/invalid_credentials",
      "title": "Invalid credentials",
      "status": 401,
      "code": "invalid_credentials",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 404Not foundapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/not_found",
      "title": "Not found",
      "status": 404,
      "code": "not_found",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 422Unprocessable contentapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/validation_failed",
      "title": "Validation failed",
      "status": 422,
      "code": "validation_failed",
      "request_id": "req_01EXAMPLE00000000000000000"
    }

Used by the customer portal with a signed-in session. API tokens cannot call it, so there is no curl example.

POST/api/v2/auth/mfa/recovery-codes

Regenerate recovery codes

Replaces your recovery codes; the previous ones stop working.

Authentication
Portal session only
Required permission
Not declared in the contract

Request body

Content types: application/json

Body: object

Example (generated from the schema)
{}

Responses

  • 200OKapplication/json

    Fields (1)
    Responses regenerateRecoveryCodes 200
    FieldTypeRequiredRules
    recovery_codesarray<string>Yes
    Example (generated from the schema)
    {
      "recovery_codes": [
        "string"
      ]
    }
  • 401Unauthorizedapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/invalid_credentials",
      "title": "Invalid credentials",
      "status": 401,
      "code": "invalid_credentials",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 409Conflictapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/alias_in_use",
      "title": "Site name already in use",
      "status": 409,
      "code": "alias_in_use",
      "request_id": "req_01EXAMPLE00000000000000000"
    }

Used by the customer portal with a signed-in session. API tokens cannot call it, so there is no curl example.

GET/api/v2/auth/mfa/factors

List second factors

Returns your confirmed second factors.

Authentication
Portal session only
Required permission
Not declared in the contract

Responses

  • 200OKapplication/json

    Fields (6)
    Responses listMfaFactors 200
    FieldTypeRequiredRules
    dataarray<object>Yes
    data[].idstringYes
    data[].kindstringYes
    • One of: totp, webauthn
    data[].namestringYes
    data[].created_atstringYes
    • Format: date-time
    data[].last_used_atstringYes
    • Format: date-time
    • Can be null
    Example (generated from the schema)
    {
      "data": [
        {
          "id": "id_example",
          "kind": "totp",
          "name": "Example",
          "created_at": "2026-01-15T10:00:00Z",
          "last_used_at": "2026-01-15T10:00:00Z"
        }
      ]
    }
  • 401Unauthorizedapplication/problem+json

    Headers: WWW-Authenticate

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/unauthenticated",
      "title": "Authentication required",
      "status": 401,
      "code": "unauthenticated",
      "request_id": "req_01EXAMPLE00000000000000000"
    }

Used by the customer portal with a signed-in session. API tokens cannot call it, so there is no curl example.

DELETE/api/v2/auth/mfa/factors/{factor_id}

Remove a second factor

Removes one of your second factors. It needs a recent sign-in.

Authentication
Portal session only
Required permission
Not declared in the contract

Parameters

Parameters disableMfaFactor
NameInTypeRequiredRules
factor_idPathstringYes
  • At most 64 characters

Responses

  • 204No content

  • 401Unauthorizedapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/invalid_credentials",
      "title": "Invalid credentials",
      "status": 401,
      "code": "invalid_credentials",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 404Not foundapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/not_found",
      "title": "Not found",
      "status": 404,
      "code": "not_found",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 409Conflictapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/alias_in_use",
      "title": "Site name already in use",
      "status": 409,
      "code": "alias_in_use",
      "request_id": "req_01EXAMPLE00000000000000000"
    }

Used by the customer portal with a signed-in session. API tokens cannot call it, so there is no curl example.

POST/api/v2/auth/register

Create an account

Creates an account and sends a verification e-mail.

Authentication
None

Request body

Content types: application/json

Request body register
FieldTypeRequiredRules
namestringYes
  • At most 201 characters
emailstringYes
  • Format: email
  • At most 254 characters
passwordstringYes
  • At least 1 characters
  • At most 1024 characters
password_confirmationstringNo
  • At most 1024 characters
  • Write only, never returned
organization_namestringNo
  • At most 120 characters
accept_termsbooleanYes
  • Always true
localestringYes
  • One of: en, es
Example (generated from the schema)
{
  "name": "Example",
  "email": "user@example.test",
  "password": "example-password",
  "password_confirmation": "string",
  "organization_name": "string",
  "accept_terms": true,
  "locale": "en"
}

Responses

  • 202Acceptedapplication/json

    Fields (1)
    Responses register 202
    FieldTypeRequiredRules
    statusstringYes
    • Always verification_sent
    Example (generated from the schema)
    {
      "status": "verification_sent"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 422Unprocessable contentapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/validation_failed",
      "title": "Validation failed",
      "status": 422,
      "code": "validation_failed",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 429Too many requestsapplication/problem+json

    Headers: Retry-After

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/rate_limited",
      "title": "Too many requests",
      "status": 429,
      "code": "rate_limited",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
curl
curl -X POST 'https://api.cdnify.lat/api/v2/auth/register' \
  -H "Content-Type: application/json" \
  -d '{"name":"Example","email":"user@example.test","password":"example-password","password_confirmation":"string","organization_name":"string","accept_terms":true,"locale":"en"}'
POST/api/v2/auth/email-verification

Verify the e-mail address

Confirms the address with the token from the verification e-mail.

Authentication
None

Request body

Content types: application/json

Request body verifyEmail
FieldTypeRequiredRules
tokenstringYes
  • At most 1024 characters
  • Write only, never returned
Example (generated from the schema)
{
  "token": "example-one-time-token"
}

Responses

  • 200OKapplication/json

    Fields (1)
    Responses verifyEmail 200
    FieldTypeRequiredRules
    statusstringYes
    • Always verified
    Example (generated from the schema)
    {
      "status": "verified"
    }
  • 400Bad requestapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/token_invalid",
      "title": "Link invalid or expired",
      "status": 400,
      "code": "token_invalid",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 429Too many requestsapplication/problem+json

    Headers: Retry-After

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/rate_limited",
      "title": "Too many requests",
      "status": 429,
      "code": "rate_limited",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
curl
curl -X POST 'https://api.cdnify.lat/api/v2/auth/email-verification' \
  -H "Content-Type: application/json" \
  -d '{"token":"example-one-time-token"}'
POST/api/v2/auth/email-verification/resend

Resend the verification e-mail

Sends the verification e-mail again.

Authentication
None

Request body

Content types: application/json

Request body resendEmailVerification
FieldTypeRequiredRules
emailstringYes
  • At most 1024 characters
Example (generated from the schema)
{
  "email": "user@example.test"
}

Responses

  • 202Accepted

  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 422Unprocessable contentapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/validation_failed",
      "title": "Validation failed",
      "status": 422,
      "code": "validation_failed",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 429Too many requestsapplication/problem+json

    Headers: Retry-After

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/rate_limited",
      "title": "Too many requests",
      "status": 429,
      "code": "rate_limited",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
curl
curl -X POST 'https://api.cdnify.lat/api/v2/auth/email-verification/resend' \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.test"}'
POST/api/v2/auth/switch-organization

Switch organization

Makes another organization you belong to the active one for this session.

Authentication
Portal session only
Required permission
Not declared in the contract

Request body

Content types: application/json

Request body switchOrganization
FieldTypeRequiredRules
organization_idstringYes
Example (generated from the schema)
{
  "organization_id": "org_u0123456789"
}

Responses

  • 204No content

  • 401Unauthorizedapplication/problem+json

    Headers: WWW-Authenticate

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/unauthenticated",
      "title": "Authentication required",
      "status": 401,
      "code": "unauthenticated",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 404Not foundapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/not_found",
      "title": "Not found",
      "status": 404,
      "code": "not_found",
      "request_id": "req_01EXAMPLE00000000000000000"
    }

Used by the customer portal with a signed-in session. API tokens cannot call it, so there is no curl example.

POST/api/v2/auth/password

Change the password

Changes your password with the current one. Every other session ends.

Authentication
Portal session only
Required permission
Not declared in the contract

Request body

Content types: application/json

Request body changePassword
FieldTypeRequiredRules
current_passwordstringYes
  • At most 1024 characters
  • Write only, never returned
new_passwordstringYes
  • At most 1024 characters
  • Write only, never returned
Example (generated from the schema)
{
  "current_password": "example-password",
  "new_password": "example-new-password"
}

Responses

  • 204No content

  • 401Unauthorizedapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/invalid_credentials",
      "title": "Invalid credentials",
      "status": 401,
      "code": "invalid_credentials",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 422Unprocessable contentapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/validation_failed",
      "title": "Validation failed",
      "status": 422,
      "code": "validation_failed",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 429Too many requestsapplication/problem+json

    Headers: Retry-After

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/rate_limited",
      "title": "Too many requests",
      "status": 429,
      "code": "rate_limited",
      "request_id": "req_01EXAMPLE00000000000000000"
    }

Used by the customer portal with a signed-in session. API tokens cannot call it, so there is no curl example.

POST/api/v2/auth/impersonation

Open a support session

Used by the portal to open a session that CDNify support started on your account. It is not used by integrations.

Authentication
None

Request body

Content types: application/json

Request body redeemImpersonation
FieldTypeRequiredRules
codestringYes
  • At most 16 characters
  • Write only, never returned
Example (generated from the schema)
{
  "code": "string"
}

Responses

  • 200OKapplication/json

    Headers: Set-Cookie

    Fields (1)
    Responses redeemImpersonation 200
    FieldTypeRequiredRules
    statusstringYes
    • One of: authenticated, mfa_required, mfa_enrollment_required, password_reset_required
    Example (generated from the schema)
    {
      "status": "authenticated"
    }
  • 400Bad requestapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/token_invalid",
      "title": "Link invalid or expired",
      "status": 400,
      "code": "token_invalid",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 429Too many requestsapplication/problem+json

    Headers: Retry-After

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/rate_limited",
      "title": "Too many requests",
      "status": 429,
      "code": "rate_limited",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
curl
curl -X POST 'https://api.cdnify.lat/api/v2/auth/impersonation' \
  -H "Content-Type: application/json" \
  -d '{"code":"string"}'
POST/api/v2/auth/activate

Activate an invited account

Sets the password of an account created by invitation, with the one-time token from the e-mail.

Authentication
None

Request body

Content types: application/json

Request body activateAccount
FieldTypeRequiredRules
tokenstringYes
  • At most 1024 characters
  • Write only, never returned
passwordstringYes
  • At most 1024 characters
  • Write only, never returned
Example (generated from the schema)
{
  "token": "example-one-time-token",
  "password": "example-password"
}

Responses

  • 200OKapplication/json

    Headers: Set-Cookie

    Fields (1)
    Responses activateAccount 200
    FieldTypeRequiredRules
    statusstringYes
    • One of: authenticated, mfa_required, mfa_enrollment_required, password_reset_required
    Example (generated from the schema)
    {
      "status": "authenticated"
    }
  • 400Bad requestapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/token_invalid",
      "title": "Link invalid or expired",
      "status": 400,
      "code": "token_invalid",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 422Unprocessable contentapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/validation_failed",
      "title": "Validation failed",
      "status": 422,
      "code": "validation_failed",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 429Too many requestsapplication/problem+json

    Headers: Retry-After

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/rate_limited",
      "title": "Too many requests",
      "status": 429,
      "code": "rate_limited",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
curl
curl -X POST 'https://api.cdnify.lat/api/v2/auth/activate' \
  -H "Content-Type: application/json" \
  -d '{"token":"example-one-time-token","password":"example-password"}'
GET/api/v2/api-tokens

List API tokens

Returns your API tokens, or every token of the organization for the roles that manage them. Secrets are never returned.

Authentication
Portal session only
Required permission
Not declared in the contract

Responses

  • 200OKapplication/json

    Fields (12)
    Responses listApiTokens 200
    FieldTypeRequiredRules
    dataarray<object>Yes
    data[].idstringYes
    • Pattern: ^tok_[0-9a-f]{32}$
    data[].namestringYes
    data[].formatstringYes
    • One of: cdnx_v1, legacy_user_hex50, legacy_user_hex40
    data[].prefixstringYes
    data[].scopesarray<string>Yes
    data[].statusstringYes
    • One of: active, revoked, expired
    data[].minebooleanYes
    data[].created_atstringYes
    • Format: date-time
    data[].expires_atstringYes
    • Format: date-time
    • Can be null
    data[].last_used_atstringYes
    • Format: date-time
    • Can be null
    data[].revoked_atstringYes
    • Format: date-time
    • Can be null
    Example (generated from the schema)
    {
      "data": [
        {
          "id": "tok_0a1b2c3d4e5f67890a1b2c3d4e5f6789",
          "name": "Example",
          "format": "cdnx_v1",
          "prefix": "string",
          "scopes": [
            "string"
          ],
          "status": "active",
          "mine": false,
          "created_at": "2026-01-15T10:00:00Z",
          "expires_at": "2026-01-15T10:00:00Z",
          "last_used_at": "2026-01-15T10:00:00Z",
          "revoked_at": "2026-01-15T10:00:00Z"
        }
      ]
    }
  • 401Unauthorizedapplication/problem+json

    Headers: WWW-Authenticate

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/unauthenticated",
      "title": "Authentication required",
      "status": 401,
      "code": "unauthenticated",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }

Used by the customer portal with a signed-in session. API tokens cannot call it, so there is no curl example.

POST/api/v2/api-tokens

Create an API token

Creates a personal API token with explicit scopes. The secret is in this answer only. It needs a recent sign-in and a verified e-mail address.

Authentication
Portal session only
Required permission
Not declared in the contract

Request body

Content types: application/json

Request body createApiToken
FieldTypeRequiredRules
namestringYes
  • At least 1 characters
  • At most 100 characters
scopesarray<string>Yes
  • At least 1 items
expires_atstringNo
  • Format: date-time
Example (generated from the schema)
{
  "name": "Example",
  "scopes": [
    "sites.read"
  ],
  "expires_at": "2026-01-15T10:00:00Z"
}

Responses

  • 201Createdapplication/json

    Fields (13)
    Responses createApiToken 201
    FieldTypeRequiredRules
    tokenobjectYes
    token.idstringYes
    • Pattern: ^tok_[0-9a-f]{32}$
    token.namestringYes
    token.formatstringYes
    • One of: cdnx_v1, legacy_user_hex50, legacy_user_hex40
    token.prefixstringYes
    token.scopesarray<string>Yes
    token.statusstringYes
    • One of: active, revoked, expired
    token.minebooleanYes
    token.created_atstringYes
    • Format: date-time
    token.expires_atstringYes
    • Format: date-time
    • Can be null
    token.last_used_atstringYes
    • Format: date-time
    • Can be null
    token.revoked_atstringYes
    • Format: date-time
    • Can be null
    secretstringYes
    Example (generated from the schema)
    {
      "token": {
        "id": "tok_0a1b2c3d4e5f67890a1b2c3d4e5f6789",
        "name": "Example",
        "format": "cdnx_v1",
        "prefix": "string",
        "scopes": [
          "string"
        ],
        "status": "active",
        "mine": false,
        "created_at": "2026-01-15T10:00:00Z",
        "expires_at": "2026-01-15T10:00:00Z",
        "last_used_at": "2026-01-15T10:00:00Z",
        "revoked_at": "2026-01-15T10:00:00Z"
      },
      "secret": "example-secret-shown-once"
    }
  • 401Unauthorizedapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/invalid_credentials",
      "title": "Invalid credentials",
      "status": 401,
      "code": "invalid_credentials",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 422Unprocessable contentapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/validation_failed",
      "title": "Validation failed",
      "status": 422,
      "code": "validation_failed",
      "request_id": "req_01EXAMPLE00000000000000000"
    }

Used by the customer portal with a signed-in session. API tokens cannot call it, so there is no curl example.

POST/api/v2/api-tokens/legacy-key

Issue a new API v1 key

Issues a new key for the legacy API v1; the previous key stops working at once. The key is in this answer only.

Authentication
Portal session only
Required permission
Not declared in the contract

Request body

Content types: application/json

Body: object

Example (generated from the schema)
{}

Responses

  • 201Createdapplication/json

    Fields (13)
    Responses regenerateLegacyApiKey 201
    FieldTypeRequiredRules
    tokenobjectYes
    token.idstringYes
    • Pattern: ^tok_[0-9a-f]{32}$
    token.namestringYes
    token.formatstringYes
    • One of: cdnx_v1, legacy_user_hex50, legacy_user_hex40
    token.prefixstringYes
    token.scopesarray<string>Yes
    token.statusstringYes
    • One of: active, revoked, expired
    token.minebooleanYes
    token.created_atstringYes
    • Format: date-time
    token.expires_atstringYes
    • Format: date-time
    • Can be null
    token.last_used_atstringYes
    • Format: date-time
    • Can be null
    token.revoked_atstringYes
    • Format: date-time
    • Can be null
    secretstringYes
    Example (generated from the schema)
    {
      "token": {
        "id": "tok_0a1b2c3d4e5f67890a1b2c3d4e5f6789",
        "name": "Example",
        "format": "cdnx_v1",
        "prefix": "string",
        "scopes": [
          "string"
        ],
        "status": "active",
        "mine": false,
        "created_at": "2026-01-15T10:00:00Z",
        "expires_at": "2026-01-15T10:00:00Z",
        "last_used_at": "2026-01-15T10:00:00Z",
        "revoked_at": "2026-01-15T10:00:00Z"
      },
      "secret": "example-secret-shown-once"
    }
  • 401Unauthorizedapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/invalid_credentials",
      "title": "Invalid credentials",
      "status": 401,
      "code": "invalid_credentials",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }

Used by the customer portal with a signed-in session. API tokens cannot call it, so there is no curl example.

DELETE/api/v2/api-tokens/{token_id}

Revoke an API token

Revokes a token, which stops working at once.

Authentication
Portal session only
Required permission
Not declared in the contract

Parameters

Parameters revokeApiToken
NameInTypeRequiredRules
token_idPathstringYes
  • Pattern: ^tok_[0-9a-f]{32}$

Responses

  • 204No content

  • 401Unauthorizedapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/invalid_credentials",
      "title": "Invalid credentials",
      "status": 401,
      "code": "invalid_credentials",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 403Forbiddenapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/insufficient_scope",
      "title": "Insufficient permissions",
      "status": 403,
      "code": "insufficient_scope",
      "request_id": "req_01EXAMPLE00000000000000000"
    }
  • 404Not foundapplication/problem+json

    Error codes:

    Problem details body
    Example
    {
      "type": "https://www.cdnify.lat/docs/errors/not_found",
      "title": "Not found",
      "status": 404,
      "code": "not_found",
      "request_id": "req_01EXAMPLE00000000000000000"
    }

Used by the customer portal with a signed-in session. API tokens cannot call it, so there is no curl example.