List project domains

Fetch all domains attached to a specific project.

Project domains are used by DevPayr to validate runtime license usage when a license is configured to validate against project domains (validate_against = project_domains).

Endpoint

GET /project/{project}/domains

Full URL:

https://api.devpayr.dev/api/v1/project/{project}/domains

Authentication

βœ… Required: API Key

Send your API key using:

X-API-KEY: <your_api_key>

This endpoint does not accept license authentication.


Path Parameters

Parameter
Type
Required
Description

project

integer

Yes

The ID of the project whose domains you want to list.

Access Rules

DevPayr checks API key access in two layers:

Project-scoped API keys

If your API key is scoped to a project, it must match the project in the URL.

Error (403)

Global API keys

If your API key is global, it must belong to the owner of the project.

Error (403)

Query Parameters

Parameter
Type
Required
Description

per_page

integer

No

Number of domains per request. Default is 50. Maximum is 50.

cursor

string

No

Cursor token for pagination (from next_cursor).

Pagination Notes

This endpoint uses cursor pagination.

  • The response includes data.next_cursor.

  • If next_cursor is null, there are no more pages.

  • To fetch the next page, pass cursor back in the query string.

Example Request

Next page example

Response

Success (200)

DevPayr returns a standard response envelope:

  • status β†’ success indicator

  • message β†’ usually "Success"

  • data.data β†’ array of project domains

  • data.next_cursor β†’ cursor token for the next page (or null)

  • errors β†’ null on success

Example Response

The domain fields returned are strictly limited to: id, project_id, domain, has_paid, is_active, is_primary, created_at, updated_at.

Project Domain Object

Field
Type
Description

id

integer

Domain ID

project_id

integer

Project ID

domain

string

Allowed domain value

has_paid

boolean

Domain-level payment status (if used by your payment enforcement rules)

is_active

boolean

Whether the domain is active

is_primary

boolean

Whether this is the primary project domain

created_at

string

ISO timestamp

updated_at

string

ISO timestamp


Caching Behavior

This endpoint caches results per API key + project + query.

  • Cache TTL: 15 minutes

  • Cache key includes:

    • API key ID

    • project ID

    • query parameters (per_page, cursor, etc.)

This improves repeated dashboard loads.

Errors

Missing API Key (401)

Invalid / Expired API Key (403)

Unauthorized (403)

Project-scoped mismatch:

Global key not owner:

Project Not Found (404)

Rate Limited (429)

Last updated