Domains

Hosts the organization owns, such as login.acme.com, for its sign-in pages and links. Prove ownership with the TXT record in verification, and route the host with a CNAME to cname_target, the organization's own host. :verify checks both now; Passway rechecks every ten minutes, and a verified host whose CNAME goes is unrouted until it returns. com.passway.domain.verified, .unrouted and .rerouted events record each change.

The domain model

A custom domain.

Properties

  • Name
    id
    Type
    string
    Description

    Domain ID.

  • Name
    etag
    Type
    string
    Description

    Current version.

  • Name
    hostname
    Type
    string
    Description

    The host, such as login.acme.com. Cannot change.

  • Name
    status
    Type
    string
    Description

    Where it stands. One of pending, verified, unrouted.

  • Name
    verification
    Type
    object
    Description

    The TXT record to publish.

  • Name
    verification.record
    Type
    string
    Description

    The record's name.

  • Name
    verification.value
    Type
    string
    Description

    The value it must hold, exactly.

  • Name
    cname_target
    Type
    string
    Description

    What the host must be a CNAME to: the organization's own host.

  • Name
    verified_at
    Type
    timestamp
    Description

    When it was first verified. Can be null.

  • Name
    last_error
    Type
    string
    Description

    What the last check found wrong, if anything. Rechecks that find nothing new change nothing, so the ETag moves only with news. Can be null.

  • Name
    labels
    Type
    object
    Description

    Labels.

  • Name
    managed_by
    Type
    string
    Description

    The tool that manages this resource, such as terraform. Can be null.

  • Name
    created_at
    Type
    timestamp
    Description

    When the domain was added.

  • Name
    updated_at
    Type
    timestamp
    Description

    When the domain last changed.


GET/v1/domains

List domains

Needs the domains:read scope.

Query parameters

  • Name
    page_size
    Type
    integer
    Description

    Results per page, 1 to 200. 0 or absent means 50; more than 200 means 200 (AIP-158).

  • Name
    page_token
    Type
    string
    Description

    next_page_token from the previous page.

  • Name
    updated_since
    Type
    timestamp
    Description

    Only resources changed at or after this time.

  • Name
    status
    Type
    string
    Description

    Only domains in this state. One of pending, verified, unrouted.

  • Name
    hostname
    Type
    string
    Description

    Only this host.

Request

GET
/v1/domains
curl https://acme.ext.passway.com/v1/domains \
  -H "Authorization: Bearer $PASSWAY_TOKEN"

Response

{
  "data": [
    {
      "id": "dom_01jd8k3m2v9x4q7r5t6w8y0z1a",
      "etag": "3f9a",
      "hostname": "login.acme.com",
      "status": "pending",
      "verification": {
        "record": "_passway-challenge.login.acme.com",
        "value": "passway-verification=3hd8f0e1c2b4a6d9"
      },
      "cname_target": "acme.ext.passway.com",
      "verified_at": "2026-11-30T14:02:11Z",
      "last_error": null,
      "labels": {
        "passway.example/cost-center": "4410",
        "team": "facilities"
      },
      "managed_by": null,
      "created_at": "2026-11-30T14:02:11Z",
      "updated_at": "2026-11-30T14:02:11Z"
    }
  ],
  "next_page_token": null
}

POST/v1/domains

Create a domain

The host must be a subdomain (a CNAME cannot sit at the apex) under a registrable domain, and not one of Passway's. The answer has the TXT record to publish.

Needs the domains:write scope.

Headers

  • Name
    Idempotency-Key
    Type
    string
    Description

    A unique key, such as a UUID. Repeating a successful request with the same key within 24 hours returns the original response; reusing it for a different request returns 422; repeating it while the first is still running returns 409 with Retry-After.

Required attributes

  • Name
    hostname
    Type
    string
    Description

    The host: a subdomain, because a CNAME cannot sit at a domain's apex.

Optional attributes

  • Name
    labels
    Type
    object
    Description

    Labels.

  • Name
    managed_by
    Type
    string
    Description

    The tool that manages this resource. Terraform sets terraform.

Request

POST
/v1/domains
curl -X POST https://acme.ext.passway.com/v1/domains \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "hostname": "login.acme.com",
    "labels": {
      "passway.example/cost-center": "4410",
      "team": "facilities"
    }
  }'

Response

{
  "id": "dom_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "etag": "3f9a",
  "hostname": "login.acme.com",
  "status": "pending",
  "verification": {
    "record": "_passway-challenge.login.acme.com",
    "value": "passway-verification=3hd8f0e1c2b4a6d9"
  },
  "cname_target": "acme.ext.passway.com",
  "verified_at": "2026-11-30T14:02:11Z",
  "last_error": null,
  "labels": {
    "passway.example/cost-center": "4410",
    "team": "facilities"
  },
  "managed_by": null,
  "created_at": "2026-11-30T14:02:11Z",
  "updated_at": "2026-11-30T14:02:11Z"
}

GET/v1/domains/{domain_id}

Get a domain

Needs the domains:read scope.

Path parameters

  • Name
    domain_id
    Type
    string
    Description

    Domain ID: dom_ followed by 1 to 64 lowercase letters and digits.

Request

GET
/v1/domains/{domain_id}
curl https://acme.ext.passway.com/v1/domains/dom_01jd8k3m2v9x4q7r5t6w8y0z1a \
  -H "Authorization: Bearer $PASSWAY_TOKEN"

Response

{
  "id": "dom_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "etag": "3f9a",
  "hostname": "login.acme.com",
  "status": "pending",
  "verification": {
    "record": "_passway-challenge.login.acme.com",
    "value": "passway-verification=3hd8f0e1c2b4a6d9"
  },
  "cname_target": "acme.ext.passway.com",
  "verified_at": "2026-11-30T14:02:11Z",
  "last_error": null,
  "labels": {
    "passway.example/cost-center": "4410",
    "team": "facilities"
  },
  "managed_by": null,
  "created_at": "2026-11-30T14:02:11Z",
  "updated_at": "2026-11-30T14:02:11Z"
}

PATCH/v1/domains/{domain_id}

Update a domain

A JSON merge patch (RFC 7396): fields in the body replace the current ones, null removes a field where the schema allows null, and objects such as labels are merged. Requires If-Match with the current etag.

Needs the domains:write scope.

Path parameters

  • Name
    domain_id
    Type
    string
    Description

    Domain ID: dom_ followed by 1 to 64 lowercase letters and digits.

Headers

  • Name
    If-Match
    Type
    string
    Description

    The resource's current etag, in double quotes. Required.

Optional attributes

  • Name
    labels
    Type
    object
    Description

    Labels to set or remove, or null to remove every label. Can be null.

  • Name
    managed_by
    Type
    string
    Description

    New managing tool, or null to clear it. Can be null.

Request

PATCH
/v1/domains/{domain_id}
curl -X PATCH https://acme.ext.passway.com/v1/domains/dom_01jd8k3m2v9x4q7r5t6w8y0z1a \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H 'If-Match: "3f9a"' \
  -H "Content-Type: application/merge-patch+json" \
  -d '{
    "labels": {
      "old-label": null,
      "team": "security"
    }
  }'

Response

{
  "id": "dom_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "etag": "3f9a",
  "hostname": "login.acme.com",
  "status": "pending",
  "verification": {
    "record": "_passway-challenge.login.acme.com",
    "value": "passway-verification=3hd8f0e1c2b4a6d9"
  },
  "cname_target": "acme.ext.passway.com",
  "verified_at": "2026-11-30T14:02:11Z",
  "last_error": null,
  "labels": {
    "passway.example/cost-center": "4410",
    "team": "facilities"
  },
  "managed_by": null,
  "created_at": "2026-11-30T14:02:11Z",
  "updated_at": "2026-11-30T14:02:11Z"
}

DELETE/v1/domains/{domain_id}

Delete a domain

The host stops being the organization's at once.

Needs the domains:write scope.

Path parameters

  • Name
    domain_id
    Type
    string
    Description

    Domain ID: dom_ followed by 1 to 64 lowercase letters and digits.

Headers

  • Name
    If-Match
    Type
    string
    Description

    The resource's current etag, in double quotes. Required.

Request

DELETE
/v1/domains/{domain_id}
curl -X DELETE https://acme.ext.passway.com/v1/domains/dom_01jd8k3m2v9x4q7r5t6w8y0z1a \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H 'If-Match: "3f9a"'

Response

204 Deleted

POST/v1/domains/{domain_id}:verify

Check a domain's DNS now

Looks up the TXT record and the CNAME, and answers with what was found: verified once both are right, or last_error saying what is missing.

Needs the domains:write scope.

Path parameters

  • Name
    domain_id
    Type
    string
    Description

    Domain ID: dom_ followed by 1 to 64 lowercase letters and digits.

Headers

  • Name
    If-Match
    Type
    string
    Description

    If set, the action only runs if the resource's etag still matches.

  • Name
    Idempotency-Key
    Type
    string
    Description

    A unique key, such as a UUID. Repeating a successful request with the same key within 24 hours returns the original response; reusing it for a different request returns 422; repeating it while the first is still running returns 409 with Retry-After.

Request

POST
/v1/domains/{domain_id}:verify
curl -X POST https://acme.ext.passway.com/v1/domains/dom_01jd8k3m2v9x4q7r5t6w8y0z1a:verify \
  -H "Authorization: Bearer $PASSWAY_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"

Response

{
  "id": "dom_01jd8k3m2v9x4q7r5t6w8y0z1a",
  "etag": "3f9a",
  "hostname": "login.acme.com",
  "status": "pending",
  "verification": {
    "record": "_passway-challenge.login.acme.com",
    "value": "passway-verification=3hd8f0e1c2b4a6d9"
  },
  "cname_target": "acme.ext.passway.com",
  "verified_at": "2026-11-30T14:02:11Z",
  "last_error": null,
  "labels": {
    "passway.example/cost-center": "4410",
    "team": "facilities"
  },
  "managed_by": null,
  "created_at": "2026-11-30T14:02:11Z",
  "updated_at": "2026-11-30T14:02:11Z"
}