Create an M2M API client. The response contains the full client secret. This is the ONLY time it is ever shown; it is not stored anywhere.
const url = 'https://api.siteqwality.com/account/m2m_client/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","scopes":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.siteqwality.com/account/m2m_client/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "scopes": [ "example" ] }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Body for POST /account/m2m_client.
object
Human-readable client name, e.g. “CI deploy hook”.
Granted scopes, e.g. ["read:monitors", "write:monitors"]. Must be
non-empty and drawn from the documented scope taxonomy.
Example generated
{ "name": "example", "description": "example", "scopes": [ "example" ]}Responses
Section titled “ Responses ”Client created; the secret is only returned once
Response for create and rotate, the ONLY places a full secret appears. The secret is never stored and can never be retrieved again.
object
One M2M client in list responses. Never contains a secret; only the last four characters Stytch retains for display.
object
Stytch client_id, the OAuth2 client_id used at the token endpoint.
Full client secret. Shown exactly once; store it now.
OAuth2 client_credentials token endpoint for this environment.
Example generated
{ "client": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "client_id": "example", "name": "example", "description": "example", "scopes": [ "example" ], "created_at": "2026-04-15T12:00:00Z", "last_rotated_at": "2026-04-15T12:00:00Z" }, "client_secret": "example", "token_endpoint": "example"}Invalid name or scopes, or client cap reached
Missing or invalid authentication
Caller lacks the owner or admin role
Internal server error