> ## Documentation Index
> Fetch the complete documentation index at: https://developers.vendaze.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Register an app

> Register a new OAuth app. Credentials are sent by email.



## OpenAPI

````yaml /en/api-reference/openapi.json post /v1/auth/register-app
openapi: 3.1.0
info:
  title: OAuth 2.1
  description: Endpoints for registering applications and managing OAuth 2.1 tokens.
  version: 1.0.0
  contact:
    name: Vendaze Support
    email: suporte@vendaze.com
servers:
  - url: https://api.vendaze.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: OAuth
  - name: People
  - name: Companies
  - name: Deals
  - name: Pipelines
  - name: Tasks
  - name: Task Types
  - name: Products
  - name: Tags
  - name: Lists
  - name: Custom Fields
  - name: Webhooks
paths:
  /v1/auth/register-app:
    post:
      tags:
        - OAuth
      summary: Register an app
      description: Register a new OAuth app. Credentials are sent by email.
      operationId: registerApp
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterAppRequest'
      responses:
        '201':
          description: App registered successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterAppResponse'
        '400':
          description: >-
            Invalid or unparseable JSON body. Error code: `bad_request`.
            Message: `"Request body must be valid JSON."`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: bad_request
                  message: Request body must be valid JSON.
                  request_id: 550e8400-e29b-41d4-a716-446655440000
        '409':
          description: >-
            Email already registered to another app. Error code: `conflict`.
            Message: `"An app is already registered with this email address."`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: conflict
                  message: An app is already registered with this email address.
                  request_id: 550e8400-e29b-41d4-a716-446655440000
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          description: >-
            Failed to create or persist the app. Error code: `internal_error`.
            Message: `"An unexpected error occurred."` Use the `request_id` to
            correlate with server-side logs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: internal_error
                  message: An unexpected error occurred.
                  request_id: 550e8400-e29b-41d4-a716-446655440000
      security: []
components:
  schemas:
    RegisterAppRequest:
      type: object
      required:
        - app_name
        - email
        - redirect_uris
        - scopes
      properties:
        app_name:
          type: string
          maxLength: 100
          example: My SaaS
        email:
          type: string
          format: email
          example: dev@mysaas.com
        description:
          type: string
          maxLength: 500
          example: Integration with Vendaze to sync contacts.
        avatar_image:
          type: string
          example: data:image/png;base64,iVBORw0KGgo...
          description: >-
            Public HTTPS URL or full base64 data URI of your app logo (e.g.
            `data:image/png;base64,...`). Accepted formats: JPEG, PNG, WebP,
            GIF, BMP, TIFF. Max 2MB.
        redirect_uris:
          type: array
          items:
            type: string
            format: uri
          example:
            - https://mysaas.com/callback/vendaze
        scopes:
          type: array
          items:
            $ref: '#/components/schemas/ScopeValue'
          example:
            - people:read
            - deals:write
          description: >-
            Scopes your app needs. Users approve them individually on the
            consent screen.
    RegisterAppResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            app_name:
              type: string
              example: My SaaS
            client_id:
              type: string
              example: 9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
            avatar_url:
              type: string
              example: https://storage.vendaze.com/assets/integrations/mysaas.jpg
              description: >-
                Public URL of the stored avatar. Only present if avatar_image
                was provided in the request.
            message:
              type: string
              example: Credentials sent by email.
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            request_id:
              type: string
              format: uuid
    ScopeValue:
      type: string
      enum:
        - people:read
        - people:write
        - companies:read
        - companies:write
        - deals:read
        - deals:write
        - tasks:read
        - tasks:write
        - activities:read
        - activities:write
        - products:read
        - products:write
        - tags:read
        - tags:write
        - lists:read
        - lists:write
        - custom_fields:read
        - custom_fields:write
        - webhooks:manage
      description: A single OAuth scope value.
    ValidationErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: validation_error
            message:
              type: string
              example: Validation failed.
            fields:
              type: object
              additionalProperties:
                type: string
            request_id:
              type: string
              format: uuid
  responses:
    ValidationError:
      description: >-
        Input validation failed. Error code: `validation_error`. The `fields`
        object maps each invalid field to a description of the problem.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
          example:
            error:
              code: validation_error
              message: Validation failed.
              fields:
                url: url must use HTTPS.
                events: At least one event is required.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    RateLimitExceeded:
      description: 'Rate limit exceeded. Error code: `rate_limit_exceeded`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: rate_limit_exceeded
              message: Rate limit exceeded. Try again in 60 seconds.
              request_id: 550e8400-e29b-41d4-a716-446655440000
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: OAuth 2.1 access token.

````