Profile
Operations tagged Profile in the public API.
About Profile
The profile is the account owner's contact details: name, company, website, job_title, country_code and a free-text phone. It belongs to the account owner, not to whoever minted the key, so PATCH /me/profile changes what the owner sees in the dashboard. Email cannot be changed through the API.
profile:write is high-risk. Only the account owner can grant it when minting a key, it is confirmed on its own (a "select all" never includes it), and a dashboard personal access token never carries it. Every successful PATCH /me/profile emits profile.updated.
Phone. phone is display-only text. The number the account verified by SMS at signup is never returned or changed here; phone_verified only says whether that verification happened.
IDs you will meet.
id— the account id, the same value asidonGET /me. No operation takes it.
Retrieve the account profile
phone is display-only contact text: it is never verified and never used to sign in or to pass the phone-verification gate. phone_verified (read-only) says whether the account completed SMS verification of its signup number, which this API neither shows nor changes.- Required scope
- profile:read
- Idempotency
- Read-only
- Rate limits
Responses
- 200Success.
objectstringRequiredAlways
profileidintegerRequiredThe account id, the same value asidonGET /me.namestringRequiredThe account owner's display name.companystringnullableRequiredCompany name;nullwhen unset.websitestringnullableRequiredWebsite URL;nullwhen unset.job_titlestringnullableRequiredJob title;nullwhen unset.country_codestringnullableRequiredISO 3166-1 alpha-2 country code, upper case;nullwhen unset.phonestringnullableRequiredDisplay-only contact phone, free text. Never verified and never the number the account signed up with.phone_verifiedbooleanRequiredWhether the account verified its signup phone number by SMS. Read-only: that number is neither shown nor changed by the API.
- 400A tenant selector header named a tenant other than the API key's own (
ACCOUNT_SELECTOR_NOT_SUPPORTED): an all-digitX-Account-Idother than the key owner's id or, whileworkspaces.context_enabledis on, anX-Workspace-Idother than the key's workspace (ws_prefix optional, case-insensitive). A header naming the key's own tenant, or a non-numericX-Account-Id, is ignored; a key cannot switch tenants, so send neither.Error codesACCOUNT_SELECTOR_NOT_SUPPORTED
- 401Missing or invalid API key.
Error codesUNAUTHENTICATED
- 403The API key is missing a required scope.
Error codesACCOUNT_SUSPENDEDINSUFFICIENT_SCOPE
- 429Rate limited. Honour the Retry-After header before retrying.
Error codesRATE_LIMITED
- 500Unexpected server error. Retry with the same Idempotency-Key.
Error codesSERVER_ERROR
Request
curl -X GET 'https://api.agentency.com/v1/me/profile' \
-H "Authorization: Bearer <YOUR_KEY>" \
-H "Content-Type: application/json"Response
Example 200 response
{
"object": "profile",
"id": 1,
"name": "Acme Support",
"company": "Acme Retail",
"website": "https://acme.example.com",
"job_title": "Support Lead",
"country_code": "GB",
"phone": "+44 20 7183 8750",
"phone_verified": false
}Update the account profile
name is required on every call — send the current one to change only other fields; an optional field you leave out is unchanged, and a blank or null one is cleared. Every successful call emits profile.updated, even one that changes nothing.
Writing phone changes the display-only contact text; it does not touch the verified signup number and leaves phone_verified unchanged.- Required scope
- profile:write
- Idempotency
- Accepts Idempotency-Key
- Webhook events
- profile.updated
- Rate limits
Header parameters
Idempotency-KeystringOptionalMakes a retry safe. The first 2xx answer is stored for 24 h and replayed for the same key withIdempotency-Replayed: true; a retry while the first request runs is 409IDEMPOTENCY_IN_FLIGHT; the same key with a different payload is 422IDEMPOTENCY_KEY_REUSED; a malformed key is 400INVALID_IDEMPOTENCY_KEY.Min length:
16Max length:128Pattern:^[A-Za-z0-9_-]+$
Request body
/v1 update profile payload. Field set is pinned on this class so a
dashboard FormRequest tweak cannot silently widen the public contract.namestringRequiredThe account owner's display name, 1–40 characters, trimmed. Required on every call: send the current name to change only other fields.Min length:
1Max length:40companystringnullableOptionalCompany name, at most 120 characters. Blank ornullclears it.Max length:
120websitestringnullableOptionalWebsite: anhttporhttpsURL of at most 255 characters. Blank ornullclears it.Format:
uriMax length:255job_titlestringnullableOptionalJob title, at most 120 characters. Blank ornullclears it.Max length:
120country_codestringnullableOptionalISO 3166-1 alpha-2 country code, any case (gbis stored asGB); a code that is not a country is 422. A code also replacescountry; blank ornullclears the code and leavescountryas it was.Min length:
2Max length:2countrystringnullableOptionalLegacy free-text country, at most 120 characters; the profile does not return it. Prefercountry_code. Overwritten bycountry_codewhen the same request sends a code.Max length:
120phonestringnullableOptionalDisplay-only contact phone (free text, max 32 characters). Not verified, not the signup number, never an identity;phone_verifiedon the profile is unaffected.Max length:
32
Responses
- 200Success.
objectstringRequiredAlways
profileidintegerRequiredThe account id, the same value asidonGET /me.namestringRequiredThe account owner's display name.companystringnullableRequiredCompany name;nullwhen unset.websitestringnullableRequiredWebsite URL;nullwhen unset.job_titlestringnullableRequiredJob title;nullwhen unset.country_codestringnullableRequiredISO 3166-1 alpha-2 country code, upper case;nullwhen unset.phonestringnullableRequiredDisplay-only contact phone, free text. Never verified and never the number the account signed up with.phone_verifiedbooleanRequiredWhether the account verified its signup phone number by SMS. Read-only: that number is neither shown nor changed by the API.
- 400A tenant selector header named a tenant other than the API key's own (
ACCOUNT_SELECTOR_NOT_SUPPORTED): an all-digitX-Account-Idother than the key owner's id or, whileworkspaces.context_enabledis on, anX-Workspace-Idother than the key's workspace (ws_prefix optional, case-insensitive). A header naming the key's own tenant, or a non-numericX-Account-Id, is ignored; a key cannot switch tenants, so send neither. A mutation that honoursIdempotency-Keyalso returnsINVALID_IDEMPOTENCY_KEYwhen that header is not 16–128[A-Za-z0-9_-]characters.Error codesACCOUNT_SELECTOR_NOT_SUPPORTEDINVALID_IDEMPOTENCY_KEY
- 401Missing or invalid API key.
Error codesUNAUTHENTICATED
- 403The API key is missing a required scope.
Error codesACCOUNT_SUSPENDEDINSUFFICIENT_SCOPE
- 409The request conflicts with the current resource state.
Error codesIDEMPOTENCY_IN_FLIGHT
- 422Validation failed. See
error.details.Error codesIDEMPOTENCY_KEY_REUSEDVALIDATION_FAILED
- 429Rate limited. Honour the Retry-After header before retrying.
Error codesRATE_LIMITED
- 500Unexpected server error. Retry with the same Idempotency-Key.
Error codesSERVER_ERROR
Request
curl -X PATCH 'https://api.agentency.com/v1/me/profile' \
-H "Authorization: Bearer <YOUR_KEY>" \
-H "Content-Type: application/json"
-d '{
"name": "name",
"company": "company",
"website": "website",
"job_title": "job_title",
"country_code": "country_code",
"country": "country",
"phone": "phone"
}'Response
Example 200 response
{
"object": "profile",
"id": 1,
"name": "Acme Support",
"company": "Acme Retail Ltd",
"website": "https://acme.example.com",
"job_title": "Head of Customer Support",
"country_code": "GB",
"phone": "+44 20 7183 8750",
"phone_verified": false
}