Builder accessValidate key

Validate key

Describes the key in the Authorization header. An agency key (ak_) returns the agency and all of its clients. A viewer key (sk_) returns its one client. Pass ?location_id= with an agency key to include that client in the response.

curl -X GET "https://mythic-analytics.gulp.workers.dev/builder/validate?location_id=acme-retail" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "role": "agency",
  "agencyId": "123e4567-e89b-12d3-a456-426614174000",
  "agencyName": "Acme Agency",
  "locations": [
    {
      "id": "acme-retail",
      "name": "Acme Retail",
      "domain": "acme.com",
      "business_name": "John Doe",
      "status": "active",
      "api_metadata": {}
    }
  ],
  "locationId": "example_string",
  "locationName": "John Doe"
}
GET
/validate
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Builder key as a bearer token. Use an agency key (Bearer ak_...) or a viewer key (Bearer sk_...). Scoped keys (mcp_) are accepted where a route names the scope they need. See Using an mcp_ key over HTTP.

Builder key as a bearer token. Use an agency key (Bearer ak_...) or a viewer key (Bearer sk_...). Scoped keys (mcp_) are accepted where a route names the scope they need. See Using an mcp_ key over HTTP.
query
location_idstring

Client location to scope the request to. Used with agency keys (ak_). Ignored for viewer keys (sk_).

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Builder key as a bearer token. Use an agency key (Bearer ak_...) or a viewer key (Bearer sk_...). Scoped keys (mcp_) are accepted where a route names the scope they need. See Using an mcp_ key over HTTP.

Query Parameters

location_idstring

Client location to scope the request to. Used with agency keys (ak_). Ignored for viewer keys (sk_).

Example:
acme-retail

Responses

rolestring
Allowed values:agency
agencyIdstring
agencyNamestring
locationsarray
locationIdstring

The location_id passed in, when it is linked to this agency.

locationNamestring