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

# Update a persona

> Fields you omit are unchanged. `job_titles` replaces the whole list.



## OpenAPI

````yaml /api-reference/openapi.yaml patch /personas/{persona_id}
openapi: 3.1.0
info:
  title: Avina API
  version: 1.0.0-draft
  description: >
    The Avina developer API, for calling Avina from your own servers.


    **Authentication.** Send your workspace API key: `Authorization: Bearer
    <key>`. Create keys in

    the Avina dashboard under Settings → API keys.


    **Credits.** `GET /usage` reports your workspace's signal credits for the
    current billing

    period: the same credits and period the dashboard shows.


    **Conventions.** JSON with snake_case fields and UTC ISO-8601 timestamps.
    Paginated lists use

    `limit` + `after` cursor pagination. `POST` requests accept an
    `Idempotency-Key` header

    (kept 24 hours). Every response has `X-Request-Id`. Request bodies must be
    JSON

    (`415 invalid_request` otherwise) and are limited to 100 KB (`413
    invalid_request`). A

    `503 internal_error` means the API key could not be checked; retry the
    request.
servers:
  - url: https://api.avina.io/v1
    description: Production (proposed domain)
security:
  - apiKey: []
tags:
  - name: Account
  - name: Personas
paths:
  /personas/{persona_id}:
    parameters:
      - name: persona_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
    patch:
      tags:
        - Personas
      summary: Update a persona
      description: Fields you omit are unchanged. `job_titles` replaces the whole list.
      operationId: updatePersona
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PersonaUpdate'
      responses:
        '200':
          description: The updated persona.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Persona'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    PersonaUpdate:
      type: object
      additionalProperties: false
      properties:
        name:
          type:
            - string
            - 'null'
          maxLength: 191
        job_titles:
          type: array
          items:
            type: string
          minItems: 1
        contacts_per_company:
          type: integer
          minimum: 1
          maximum: 100
        enrich_emails:
          type: boolean
        enrich_phones:
          type: boolean
        contact_countries:
          type:
            - array
            - 'null'
          items:
            type: string
            pattern: ^[A-Za-z]{2}$
          description: >-
            Countries where the contacts are located (ISO 3166-1 alpha-2), not
            the company headquarters. null or [] = worldwide.
    Persona:
      type: object
      required:
        - object
        - id
        - job_titles
        - contacts_per_company
        - enrich_emails
        - enrich_phones
        - contact_countries
        - created_at
        - updated_at
      properties:
        object:
          type: string
          const: persona
        id:
          type: string
          format: uuid
        name:
          type:
            - string
            - 'null'
        job_titles:
          type: array
          items:
            type: string
        contacts_per_company:
          type: integer
        enrich_emails:
          type: boolean
        enrich_phones:
          type: boolean
        contact_countries:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            Countries where the contacts are located, uppercase; null or [] =
            worldwide.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              enum:
                - invalid_request
                - invalid_api_key
                - not_found
                - idempotency_key_reused
                - rate_limited
                - internal_error
                - timeout
            message:
              type: string
            request_id:
              type: string
            details:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
  responses:
    BadRequest:
      description: The request is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_request
              message: foo is not a recognized field
              request_id: req_8f2a
              details:
                - field: foo
                  message: is not a recognized field
    Unauthorized:
      description: The API key is missing, invalid or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_api_key
              message: The API key is invalid or revoked.
              request_id: req_8f2a
    NotFound:
      description: No such object in this workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: not_found
              message: Persona not found.
              request_id: req_8f2a
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Workspace API key from the Avina dashboard (Settings → API keys).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.