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

# Change an address

> Change the email address Artil gave an agent.



## OpenAPI

````yaml /openapi.json patch /agents/{id}/addresses/{addressId}
openapi: 3.1.0
info:
  title: Artil API
  description: Give AI agents their own email inbox, SMS number and secret storage.
  version: 1.0.0
servers:
  - url: https://app.artil.dev/api
security:
  - token: []
paths:
  /agents/{id}/addresses/{addressId}:
    patch:
      tags:
        - Addresses
      summary: Change an address
      description: Change the email address Artil gave an agent.
      operationId: changeAddress
      parameters:
        - in: path
          name: id
          required: true
          description: The agent's id
          schema:
            type: string
            format: uuid
        - schema:
            type: string
          in: path
          name: addressId
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  type: string
                  format: email
                  pattern: >-
                    ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
              required:
                - value
      responses:
        '200':
          description: The changed address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Address'
        default:
          $ref: '#/components/responses/Failure'
components:
  schemas:
    Address:
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        channel:
          type: string
          enum:
            - email
            - sms
        value:
          type: string
          description: The email address or phone number
        domainId:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
          description: The workspace's own domain the address is on
        primary:
          type: boolean
          description: Whether new messages on its channel go out from it
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - channel
        - value
        - domainId
        - primary
        - createdAt
  responses:
    Failure:
      description: The request failed; the error says why
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - invalid_input
                      - unauthorized
                      - forbidden
                      - plan_limit
                      - not_found
                      - conflict
                      - rate_limited
                      - internal
                      - unavailable
                  message:
                    type: string
                required:
                  - code
                  - message
            required:
              - error
  securitySchemes:
    token:
      type: http
      scheme: bearer

````

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