> ## 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.

# Set access

> Choose who can wake an agent on a channel.



## OpenAPI

````yaml /openapi.json put /agents/{id}/access/{channel}
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}/access/{channel}:
    put:
      tags:
        - Access
      summary: Set access
      description: Choose who can wake an agent on a channel.
      operationId: setAccess
      parameters:
        - in: path
          name: id
          required: true
          description: The agent's id
          schema:
            type: string
            format: uuid
        - schema:
            type: string
          in: path
          name: channel
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                admit:
                  type: string
                  enum:
                    - anyone
                    - list
                senders:
                  maxItems: 200
                  type: array
                  items:
                    type: string
              required:
                - admit
                - senders
      responses:
        '200':
          description: The channel's access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Access'
        default:
          $ref: '#/components/responses/Failure'
components:
  schemas:
    Access:
      type: object
      properties:
        admit:
          type: string
          enum:
            - anyone
            - list
          description: Whether anyone or only the listed senders wake the agent
        senders:
          type: array
          items:
            type: string
      required:
        - admit
        - senders
  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.