TypeScript
const options = {method: 'POST'}; fetch('http://localhost:8000/v1/auth/me/provision-default-organization', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
{ "success": true, "data": { "organization": { "id": "<string>", "name": "<string>", "slug": "<string>" }, "isNew": true }, "meta": { "requestId": "<string>", "timestamp": "<string>" } }
Create a default organization for the user during OAuth signup flow. Idempotent - returns existing organization if one exists.
User already has an organization
true
Show child attributes
Was this page helpful?