CodeAtlas OAuth API

Agent self-registration and token issuance.

GitHub OpenAPI

Operations 6

POST /oauth2/register Register an OAuth client (RFC 7591) #
POST /oauth2/token Get an access token (RFC 6749 client_credentials) #
POST /oauth2/revoke Revoke an access token (RFC 7009) #
GET /agent/identity Who am I (Bearer whoami) #
POST /agent/identity Register an agent for a person (service_auth) #
GET /agent/auth Agent authentication entry point #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/codeatlas-com-br:codeatlas-com-br-oauth-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

codeatlas-com-br-oauth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Codeatlas Com Br OAuth API
  version: 1.0.0
  contact:
    name: CodeAtlas
    email: contato@codeatlas.com.br
    url: https://codeatlas.com.br/
  description: 'Operations tagged OAuth across 2 of this provider''s published API definitions: codeatlas-com-br-openapi.json, codeatlas-com-br-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://codeatlas.com.br/api/v1
  description: Production API
- url: https://codeatlas.com.br/api/sandbox/v1
  description: 'Sandbox: fixture data, nothing is delivered or stored. Same paths and OAuth flow as production; request tokens with resource=https://codeatlas.com.br/api/sandbox/v1.'
security: []
tags:
- name: OAuth
  description: Agent self-registration and token issuance.
paths:
  /oauth2/register:
    servers:
    - url: https://codeatlas.com.br
      description: Origin. OAuth endpoints are not under /api/v1.
    post:
      operationId: registerOAuthClient
      summary: Register an OAuth client (RFC 7591)
      description: 'Self-registers an agent and returns a client_id and client_secret. The secret is shown once and stored only as a hash. Limit: 10 per hour per IP. Only the client_credentials grant exists.'
      tags:
      - OAuth
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientRegistrationRequest'
            examples:
              agent:
                value:
                  client_name: acme-procurement-agent
      responses:
        '201':
          description: Client registered.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientRegistrationResponse'
        '400':
          description: invalid_client_metadata.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthError'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '429':
          $ref: '#/components/responses/RateLimited'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
  /oauth2/token:
    servers:
    - url: https://codeatlas.com.br
      description: Origin. OAuth endpoints are not under /api/v1.
    post:
      operationId: issueAccessToken
      summary: Get an access token (RFC 6749 client_credentials)
      description: 'Exchanges credentials for a signed JWT valid for 3600 seconds. grant_type=client_credentials: authenticate with HTTP Basic or with client_id and client_secret in the form body. grant_type=urn:workos:agent-auth:grant-type:claim: send the claim_token from POST /agent/identity; answers authorization_pending until the person confirms the user_code, slow_down if polled faster than every 5 seconds, expired_token after 600 seconds. Use resource=https://codeatlas.com.br/api/sandbox/v1 for the sandbox. Limit: 30 per minute per IP.'
      tags:
      - OAuth
      security: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TokenRequest'
      responses:
        '200':
          description: Access token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '400':
          description: invalid_request, unsupported_grant_type, invalid_scope or invalid_target.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthError'
        '401':
          description: invalid_client.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
  /oauth2/revoke:
    servers:
    - url: https://codeatlas.com.br
      description: Origin. OAuth endpoints are not under /api/v1.
    post:
      operationId: revokeAccessToken
      summary: Revoke an access token (RFC 7009)
      description: 'Revokes an access token that belongs to the authenticated client. Answers 200 with an empty body, also when the token was already invalid. A revoked token is rejected on every endpoint immediately. Limit: 30 per minute per IP.'
      tags:
      - OAuth
      security: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - token
              properties:
                token:
                  type: string
                token_type_hint:
                  type: string
                  const: access_token
                client_id:
                  type: string
                client_secret:
                  type: string
      responses:
        '200':
          description: Revoked, or already invalid.
        '400':
          description: invalid_request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthError'
        '401':
          description: invalid_client.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
  /agent/identity:
    servers:
    - url: https://codeatlas.com.br
      description: Origin. OAuth endpoints are not under /api/v1.
    get:
      operationId: getAgentIdentity
      summary: Who am I (Bearer whoami)
      description: 'Returns the identity behind a Bearer token: client_id, scopes, audience, expiry and, for service_auth registrations, the confirmed email. Accepts production and sandbox tokens. 401 with a WWW-Authenticate Bearer challenge when the token is missing or invalid.'
      tags:
      - OAuth
      security:
      - oauth2ClientCredentials:
        - api:write
      responses:
        '200':
          description: The caller.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentIdentity'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
    post:
      operationId: registerServiceAuth
      summary: Register an agent for a person (service_auth)
      description: 'WorkOS auth.md service_auth registration. Send the person''s email as login_hint. CodeAtlas emails that address a confirmation link. Show the returned claim.user_code to the person; they open the link, type the code and confirm. Then poll POST /oauth2/token with grant_type=urn:workos:agent-auth:grant-type:claim and the claim_token. Answers 503 when the confirmation email cannot be sent. Limit: 10 per hour per IP.'
      tags:
      - OAuth
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceAuthRequest'
      responses:
        '200':
          description: Registration created. Surface claim.verification_uri and claim.user_code to the person.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceAuthResponse'
        '400':
          description: invalid_request, anonymous_not_enabled or identity_assertion_not_enabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          description: 'temporarily_unavailable: the confirmation email could not be sent.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthError'
  /agent/auth:
    servers:
    - url: https://codeatlas.com.br
      description: Origin. OAuth endpoints are not under /api/v1.
    get:
      operationId: getAgentAuth
      summary: Agent authentication entry point
      description: 'Without a token: 401 with WWW-Authenticate: Bearer resource_metadata pointing at the RFC 9728 metadata. With a valid token: 200 listing the real auth endpoints, methods and the sandbox.'
      tags:
      - OAuth
      security: []
      responses:
        '200':
          description: Authenticated. Lists endpoints and methods.
          content:
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
components:
  responses:
    Unauthorized:
      description: Missing, malformed, expired or wrong-audience Bearer token. WWW-Authenticate carries the resource metadata URL.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        WWW-Authenticate:
          $ref: '#/components/headers/WWWAuthenticate'
    UnsupportedMediaType:
      description: The body must be application/json.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    MethodNotAllowed:
      description: The HTTP method is not supported.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        Allow:
          description: Supported methods.
          schema:
            type: string
    RateLimited:
      description: Rate limit exceeded. Wait Retry-After seconds.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        RateLimit:
          $ref: '#/components/headers/RateLimit'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimitPolicy'
    PayloadTooLarge:
      description: The body is larger than 16384 bytes.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    OAuthError:
      type: object
      required:
      - error
      properties:
        error:
          type: string
          description: RFC 6749 error code.
        error_description:
          type: string
      additionalProperties: false
    ClientRegistrationRequest:
      type: object
      required:
      - client_name
      properties:
        client_name:
          type: string
          minLength: 2
          maxLength: 80
        grant_types:
          type: array
          items:
            type: string
            const: client_credentials
        token_endpoint_auth_method:
          type: string
          enum:
          - client_secret_basic
          - client_secret_post
          default: client_secret_basic
      additionalProperties: true
    ClientRegistrationResponse:
      type: object
      required:
      - client_id
      - client_secret
      - client_secret_expires_at
      - grant_types
      - scope
      - token_endpoint_auth_method
      properties:
        client_id:
          type: string
        client_secret:
          type: string
          description: Shown once.
        client_id_issued_at:
          type: integer
        client_secret_expires_at:
          type: integer
          const: 0
        client_name:
          type: string
        grant_types:
          type: array
          items:
            type: string
        scope:
          type: string
          const: api:write
        token_endpoint_auth_method:
          type: string
    ServiceAuthRequest:
      type: object
      required:
      - type
      - login_hint
      properties:
        type:
          type: string
          const: service_auth
        login_hint:
          type: string
          format: email
          description: The email of the person the agent acts for.
      additionalProperties: false
    TokenRequest:
      type: object
      required:
      - grant_type
      properties:
        grant_type:
          type: string
          enum:
          - client_credentials
          - urn:workos:agent-auth:grant-type:claim
        client_id:
          type: string
        client_secret:
          type: string
        scope:
          type: string
          const: api:write
          default: api:write
        resource:
          type: string
          enum:
          - https://codeatlas.com.br/api/v1
          - https://codeatlas.com.br/api/sandbox/v1
          default: https://codeatlas.com.br/api/v1
        claim_token:
          type: string
          description: 'For the claim grant: the claim_token from POST /agent/identity.'
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          - hint
          properties:
            code:
              type: string
              enum:
              - bad_request
              - conflict
              - forbidden
              - invalid_token
              - method_not_allowed
              - not_found
              - payload_too_large
              - rate_limited
              - unauthorized
              - unprocessable
              - unsupported_media_type
              description: Stable machine-readable code.
            message:
              type: string
              description: Human-readable description.
            hint:
              type: string
              description: How to fix the request.
          additionalProperties: false
      additionalProperties: false
      examples:
      - error:
          code: unauthorized
          message: This endpoint requires a Bearer access token.
          hint: 'Register a client at POST /oauth2/register, request a token at POST /oauth2/token and send it as Authorization: Bearer <token>.'
    TokenResponse:
      type: object
      required:
      - access_token
      - token_type
      - expires_in
      - scope
      properties:
        access_token:
          type: string
        token_type:
          type: string
          const: Bearer
        expires_in:
          type: integer
          const: 3600
        scope:
          type: string
    ServiceAuthResponse:
      type: object
      required:
      - registration_id
      - registration_type
      - claim_token
      - claim_token_expires
      - claim_url
      - post_claim_scopes
      - claim
      properties:
        registration_id:
          type: string
        registration_type:
          type: string
          const: service_auth
        claim_token:
          type: string
          description: Returned once. Keep in memory for the ceremony.
        claim_token_expires:
          type: string
          format: date-time
        claim_url:
          type: string
          format: uri
        post_claim_scopes:
          type: array
          items:
            type: string
        claim:
          type: object
          required:
          - user_code
          - verification_uri
          - expires_in
          - interval
          properties:
            user_code:
              type: string
              pattern: ^[0-9]{6}$
            verification_uri:
              type: string
              format: uri
            expires_in:
              type: integer
              const: 600
            interval:
              type: integer
              const: 5
      additionalProperties: false
    AgentIdentity:
      type: object
      required:
      - client_id
      - audience
      - scopes
      - expires_at
      - issued_at
      - issuer
      - registration_type
      - sandbox
      - email
      properties:
        client_id:
          type: string
        audience:
          type: string
          format: uri
        scopes:
          type: array
          items:
            type: string
        expires_at:
          type: string
          format: date-time
        issued_at:
          type: string
          format: date-time
        issuer:
          type: string
          format: uri
        email:
          type:
          - string
          - 'null'
          description: Confirmed email for service_auth registrations, otherwise null.
        registration_type:
          type: string
          enum:
          - dynamic_client
          - service_auth
        sandbox:
          type: boolean
      additionalProperties: false
  headers:
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
    WWWAuthenticate:
      description: Bearer challenge with resource_metadata pointing to the RFC 9728 protected resource metadata.
      schema:
        type: string
      example: Bearer resource_metadata="https://codeatlas.com.br/.well-known/oauth-protected-resource", scope="api:write"
    RateLimit:
      description: IETF draft-ietf-httpapi-ratelimit-headers. Remaining quota r and seconds until reset t for the named policy.
      schema:
        type: string
      example: '"read";r=119;t=45'
    RateLimitPolicy:
      description: Quota q and window w in seconds of the policy that applies.
      schema:
        type: string
      example: '"read";q=120;w=60'
  securitySchemes:
    oauth2ClientCredentials:
      type: oauth2
      description: OAuth 2.0 client_credentials. Register a client at POST /oauth2/register, then POST /oauth2/token. Tokens are JWTs valid for 3600 seconds. For the sandbox request a token with resource=https://codeatlas.com.br/api/sandbox/v1.
      flows:
        clientCredentials:
          tokenUrl: https://codeatlas.com.br/oauth2/token
          scopes:
            api:write: Create contact requests and exports.
externalDocs:
  description: Developer documentation
  url: https://codeatlas.com.br/docs
x-refined-from:
- codeatlas-com-br-openapi.json
- codeatlas-com-br-openapi.yml
x-sandbox:
  url: https://codeatlas.com.br/api/sandbox/v1
  description: Test mode for the whole API. Read endpoints return fixture services (sandbox-one, sandbox-two). POST /contact-requests is accepted and answers delivery=sandbox but is never emailed or stored. Exports and batch work on the fixtures. Sandbox and production tokens are not interchangeable.
  auth: Same OAuth client_credentials flow. Request tokens with resource=https://codeatlas.com.br/api/sandbox/v1.
  health: https://codeatlas.com.br/api/sandbox/v1/health
  documentation: https://codeatlas.com.br/auth.md