openapi: 3.0.1 info: title: SlashID Groups Organization Token Template API description: "This is the [OpenAPI](https://www.openapis.org/) specification for communicating with the [SlashID](https://www.slashid.dev/) service.\n\nThe latest version of the OpenAPI API spec can be fetched from [our CDN](https://cdn.slashid.com/slashid-openapi-latest.yaml).\n\nWe recommend you use an [OpenAPI SDK generator](https://openapi.tools/#sdk) to create a client library in your programming language,\nbut you can also use this documentation to make HTTP calls directly.\n\n> **Compatibility note**: We aim to keep wire compatibility whenever we update the API, but parts of the specification may occasionally be refactored.\n If you use an SDK generator, your code may require minor changes between versions.\n" version: '1.1' termsOfService: https://www.slashid.dev/terms-of-use/ contact: name: API Support email: contact@slashid.dev servers: - url: https://api.slashid.com description: Production - url: https://api.sandbox.slashid.com description: Sandbox security: - ApiKeyAuth: [] tags: - name: Organization Token Template paths: /organizations/config/token-template: parameters: - $ref: '#/components/parameters/OrgIDHeader' get: operationId: GetOrganizationsConfigTokenTemplate x-rbac-enabled: true x-rbac-allowed-groups: admin,member tags: - Organization Token Template summary: Get the organization's token template description: 'Retrieves the token template for the given organization. If a custom token template was previously created, it will be returned. Otherwise the default template is returned.' responses: '200': description: OK content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponseBase' - type: object properties: result: $ref: '#/components/schemas/TokenTemplate' required: - result '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' put: operationId: PutOrganizationsConfigTokenTemplate x-rbac-enabled: true x-rbac-allowed-groups: admin tags: - Organization Token Template parameters: - $ref: '#/components/parameters/RequiredConsistencyHeader' - $ref: '#/components/parameters/RequiredConsistencyTimeoutHeader' summary: Modify the organization's token template description: "Sets the token template for your organization. If a template already exists it will be overwritten and cannot\nbe retrieved.\n\nThe template must conform to the [mustache template syntax](https://mustache.github.io/mustache.5.html). The following tags are available:\n - `{{ organization }}`: provides information on the organization. Renders to\n ```json\n {\n \"id\": \"00000000-0000-0000-0000-000000000000\",\n \"name\": \"Your Org Name\",\n \"ancestors\": [\n {\n \"id\": \"00000000-0000-0000-0000-111111111111\",\n \"name\": \"Parent Name\"\n },\n ...\n ]\n }\n ```\n\n The following sub-tags are available:\n - `{{ organization.id }}`: the ID of the organization. Renders to `00000000-0000-0000-0000-000000000000`\n - `{{ organization.name }}`: the name of the organization. Renders to `Your Org Name`\n - `{{ organization.ancestors }}`: the list of ancestor organizations, starting from the parent up to the root. Renders to\n ```json\n [{\"id\": \"00000000-0000-0000-0000-111111111111\", \"name\": \"Parent Name\"}, ...]\n ```\n - `{{ person.permissions }}`: provides information on the person's permissions (additional and from roles). Renders to\n ```json\n [\n \"permission1\",\n \"permission2\"\n ]\n ```\n" requestBody: description: The new content of the token template content: application/json: schema: $ref: '#/components/schemas/TokenTemplate' responses: '204': $ref: '#/components/responses/NoContent' '400': $ref: '#/components/responses/BadRequest' '408': $ref: '#/components/responses/Timeout' components: parameters: RequiredConsistencyHeader: name: SlashID-Required-Consistency in: header description: 'The consistency level required for this request. If the consistency level is not achieved within the timeout, the request will fail with a 408 Request Timeout error. 408 Request Timeout error indicates that request was not handled within the timeout, but it may still be handled after request timeout. Allowed values: * `local_region`: Wait while the request executes in the local region. * `all_regions`: Wait while the request executes across all regions. You can learn more about our replication model on our [Cross-region Replication Model](/docs/access/concepts/replication) page. ' schema: type: string enum: - local_region - all_regions default: local_region RequiredConsistencyTimeoutHeader: name: SlashID-Required-Consistency-Timeout in: header description: 'The maximum amount of seconds to wait for the requested consistency level to be achieved. If the consistency level is not achieved within this time, the request will fail with a 408 Request Timeout error. 408 Request Timeout error indicates that request was not handled within the timeout, but it may still be handled after request timeout. You can learn more about our replication model on our [Cross-region Replication Model](/docs/access/concepts/replication) page. ' schema: type: integer default: 30 maximum: 120 minimum: 1 OrgIDHeader: name: SlashID-OrgID in: header schema: type: string required: true description: The organization ID example: af5fbd30-7ce7-4548-8b30-4cd59cb2aba1 schemas: APIResponseError: type: object properties: httpcode: type: integer message: type: string APICursorPagination: type: object required: - limit - cursor - total_count properties: limit: type: integer cursor: type: string total_count: type: integer format: int64 APIResponseBase: type: object properties: meta: $ref: '#/components/schemas/APIMeta' errors: type: array items: $ref: '#/components/schemas/APIResponseError' APIMeta: type: object properties: pagination: $ref: '#/components/schemas/APIPagination' cursor_pagination: $ref: '#/components/schemas/APICursorPagination' APIPagination: type: object required: - limit - offset - total_count properties: limit: type: integer offset: type: integer total_count: type: integer format: int64 TokenTemplate: description: Template for user tokens emitted on authentication. type: object properties: content: type: string description: The token claims [mustache](https://mustache.github.io/mustache.5.html) template. Must render to a valid JSON object. example: '{ "my_custom_org_name": "custom_prefix-{{ organization.name }}" }' required: - content responses: Unauthorized: description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/APIResponseBase' NoContent: description: No content BadRequest: description: Bad Request content: application/json: schema: $ref: '#/components/schemas/APIResponseBase' Timeout: description: 'Request Timeout - operation exceeded the timeout limit from SlashID-Required-Consistency-Timeout. The operation may still be in progress, and will be completed eventually.' content: application/json: schema: $ref: '#/components/schemas/APIResponseBase' securitySchemes: ApiKeyAuth: description: Authorizes the request with the organization's API Key. x-svc-um-api: true type: apiKey in: header name: SlashID-API-Key OAuth2ClientIdSecret: description: Authorizes the request with a client ID/client secret pair type: http scheme: basic OAuth2AccessTokenBearer: description: Authorizes the request with an Access Token for the current user. type: http scheme: bearer bearerFormat: opaque