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

# Delete api key

> Requires one of the following scopes: `api_keys:delete`, `api_keys:all`, `all:delete`, `all:all`



## OpenAPI

````yaml https://api.instantly.ai/openapi/api_v2.json delete /api/v2/api-keys/{id}
openapi: 3.1.0
info:
  title: API Explorer
  description: >-
    The entire API V2 documentation is interactive and can be tested here. To
    the right side of every endpoint you will see a box with an example request.
    You can click on the "Try it" button to send a request to the server right
    from the docs. You will need to provide an API key by clicking the
    `ApiKeyAuth_token` blue text.
  version: 2.0.0
servers:
  - url: https://api.instantly.ai
    description: Instantly API Server
security:
  - ApiKeyAuth: []
tags:
  - name: Analytics
    description: Endpoints related to analytics
    x-displayName: Analytics
  - name: OAuth
    description: >-
      OAuth authentication endpoints for connecting Google and Microsoft email
      accounts
    x-displayName: OAuth
  - name: Account
    description: An email account that can be used to send campaigns
    x-displayName: Account
  - name: Campaign
    description: A campaign that can be sent to a list of recipients
    x-displayName: Campaign
  - name: Email
    description: >-
      A campaign email, a reply, a manually sent email, or any other email
      that's visible in the Unibox
    x-displayName: Email
  - name: EmailVerification
    description: A single email verification
    x-displayName: Email Verification
  - name: LeadList
    description: A list used to store leads
    x-displayName: Lead List
  - name: InboxPlacementTest
    description: An inbox placement test
    x-displayName: Inbox Placement Test
  - name: InboxPlacementAnalytics
    description: Analytics data for individual emails in inbox placement tests
    x-displayName: Inbox Placement Analytics
  - name: InboxPlacementBlacklist&SpamAssassinReport
    description: Report data for an inbox placement test
    x-displayName: Inbox Placement Blacklist & SpamAssassin Report
  - name: APIKey
    description: API Key
    x-displayName: API Key
  - name: AccountCampaignMapping
    description: Account Campaign Mapping
    x-displayName: Account Campaign Mapping
  - name: Lead
    description: A lead entity representing an individual lead
    x-displayName: Lead
  - name: BackgroundJob
    description: A background job that can be used to perform long-running tasks
    x-displayName: Background Job
  - name: CustomTag
    description: >-
      A custom tag for organizing and categorizing accounts and campaigns. You
      can use them as filters in apis that list accounts and campaigns.
    x-displayName: Custom Tag
  - name: CustomTagMapping
    description: >-
      This entity represents a tag being assigned to a specific campaign or
      email account. When an email account is assigned a tag, a new custom tag
      mapping entry is created, which connects the tag (`tag_id` field) with the
      email account (`resource_id` field). You can use it to see which tag si
      connected to which resource.
    x-displayName: Custom Tag Mapping
  - name: BlockListEntry
    description: A blocked email or domain
    x-displayName: Block List Entry
  - name: LeadLabel
    description: A custom label for categorizing and managing leads
    x-displayName: Lead Label
  - name: Workspace
    description: A workspace entity representing a workspace
    x-displayName: Workspace
  - name: SuperSearchEnrichment
    description: >-
      An enrichment can take different forms, such as email enrichment or
      LinkedIn enrichment. Leads may be imported from SuperSearch using the
      dedicated endpoint, or enriched directly within a list or campaign by
      attaching an enrichment to it.
    x-displayName: SuperSearch Enrichment
  - name: WorkspaceGroupMember
    description: >-
      A member of a workspace group. You can use the endpoints within this
      entity to manage the members of a workspace group.
    x-displayName: Workspace Group Member
  - name: WorkspaceMember
    description: A member of a workspace with associated user details
    x-displayName: Workspace Member
  - name: CampaignSubsequence
    description: A subsequence entity representing a follow-up sequence
    x-displayName: Campaign Subsequence
  - name: AuditLog
    description: Audit log records for tracking system activities
    x-displayName: Audit Log
  - name: Webhook
    description: A webhook subscription for receiving event notifications
    x-displayName: Webhook
  - name: WebhookEvent
    description: A webhook event that was sent or attempted to be sent
    x-displayName: Webhook Event
  - name: DFYEmailAccountOrder
    description: A Done-For-You email account order
    x-displayName: DFY Email Account Order
  - name: CustomPromptTemplate
    description: Custom prompt templates for creating custom prompts
    x-displayName: Custom Prompt Template
  - name: SalesFlow
    description: >-
      Manages how sales users view and interact with campaign and lead lists
      within the sales flow.
    x-displayName: Sales Flow
  - name: EmailTemplate
    description: A campaign email template
    x-displayName: Email Template
  - name: WorkspaceBilling
    description: Workspace Billing
    x-displayName: Workspace Billing
  - name: CRMActions
    description: CRM related actions
    x-displayName: CRM Actions
paths:
  /api/v2/api-keys/{id}:
    delete:
      tags:
        - APIKey
      summary: Delete api key
      description: >-
        Requires one of the following scopes: `api_keys:delete`, `api_keys:all`,
        `all:delete`, `all:all`
      operationId: deleteAPIKey
      parameters:
        - schema:
            type: string
            format: uuid
            example: 019e18e2-a4ec-782a-8dc3-00dd04bc604f
          in: path
          name: id
          required: true
          description: The ID of the item to delete
      requestBody:
        content:
          application/json:
            schema:
              type: 'null'
              example: null
      responses:
        '200':
          description: The deleted API Key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/def-9'
        '401':
          description: >-
            This request is unauthorized (either the Authorization header is
            missing or invalid, or the API key has been revoked)
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    enum:
                      - 401
                    example: 401
                  error:
                    type: string
                    enum:
                      - Unauthorized
                    example: Unauthorized
                  message:
                    type: string
                    example: Missing Authorization header
                required:
                  - statusCode
                  - error
                  - message
        '402':
          description: >-
            This request cannot be fulfilled because the workspace does not have
            an active paid plan
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    enum:
                      - 402
                    example: 402
                  error:
                    type: string
                    enum:
                      - Payment Required
                    example: Payment Required
                  message:
                    type: string
                    example: Workspace does not have an active paid plan
                required:
                  - statusCode
                  - error
                  - message
        '404':
          description: The requested resource was not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    enum:
                      - 404
                    example: 404
                  error:
                    type: string
                    enum:
                      - Not Found
                    example: Not Found
                  message:
                    type: string
                    example: Resource not found
                required:
                  - statusCode
                  - error
                  - message
        '429':
          description: >-
            You have exceeded the rate limit. Please check the rate limit docs
            for more information.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    enum:
                      - 429
                    example: 429
                  error:
                    type: string
                    enum:
                      - Too Many Requests
                    example: Too Many Requests
                  message:
                    type: string
                    example: Rate limit exceeded
                required:
                  - statusCode
                  - error
                  - message
components:
  schemas:
    def-9:
      title: API Key
      description: API Key
      x-tags:
        - Schemas
        - APIKey
      type: object
      properties:
        id:
          type: string
          readOnly: true
          format: uuid
          example: 019e18e2-78d4-7322-941a-7384d8969c61
        name:
          type: string
          example: My API Key
        scopes:
          type: array
          items:
            type: string
            enum:
              - all:all
              - all:create
              - all:read
              - all:update
              - all:delete
              - ai_agents:all
              - ai_agents:create
              - ai_agents:read
              - ai_agents:update
              - ai_agents:delete
              - api_keys:all
              - api_keys:create
              - api_keys:read
              - api_keys:update
              - api_keys:delete
              - audit_logs:all
              - audit_logs:create
              - audit_logs:read
              - audit_logs:update
              - audit_logs:delete
              - custom_prompt_templates:all
              - custom_prompt_templates:create
              - custom_prompt_templates:read
              - custom_prompt_templates:update
              - custom_prompt_templates:delete
              - account_campaign_mappings:all
              - account_campaign_mappings:create
              - account_campaign_mappings:read
              - account_campaign_mappings:update
              - account_campaign_mappings:delete
              - campaigns:all
              - campaigns:create
              - campaigns:read
              - campaigns:update
              - campaigns:delete
              - inbox_placement_tests:all
              - inbox_placement_tests:create
              - inbox_placement_tests:read
              - inbox_placement_tests:update
              - inbox_placement_tests:delete
              - inbox_placement_analytics:all
              - inbox_placement_analytics:create
              - inbox_placement_analytics:read
              - inbox_placement_analytics:update
              - inbox_placement_analytics:delete
              - inbox_placement_reports:all
              - inbox_placement_reports:create
              - inbox_placement_reports:read
              - inbox_placement_reports:update
              - inbox_placement_reports:delete
              - lead_lists:all
              - lead_lists:create
              - lead_lists:read
              - lead_lists:update
              - lead_lists:delete
              - leads:all
              - leads:create
              - leads:read
              - leads:update
              - leads:delete
              - background-jobs:all
              - background-jobs:create
              - background-jobs:read
              - background-jobs:update
              - background-jobs:delete
              - custom_tags:all
              - custom_tags:create
              - custom_tags:read
              - custom_tags:update
              - custom_tags:delete
              - custom_tag_mappings:all
              - custom_tag_mappings:create
              - custom_tag_mappings:read
              - custom_tag_mappings:update
              - custom_tag_mappings:delete
              - crm_actions:all
              - crm_actions:create
              - crm_actions:read
              - crm_actions:update
              - crm_actions:delete
              - accounts:all
              - accounts:create
              - accounts:read
              - accounts:update
              - accounts:delete
              - block_list_entries:all
              - block_list_entries:create
              - block_list_entries:read
              - block_list_entries:update
              - block_list_entries:delete
              - lead-labels:all
              - lead-labels:create
              - lead-labels:read
              - lead-labels:update
              - lead-labels:delete
              - email_verifications:all
              - email_verifications:create
              - email_verifications:read
              - emails:all
              - emails:create
              - emails:read
              - emails:update
              - emails:delete
              - email_templates:all
              - email_templates:create
              - email_templates:read
              - email_templates:update
              - email_templates:delete
              - workspaces:all
              - workspaces:create
              - workspaces:read
              - workspaces:update
              - workspaces:delete
              - workspace_billing:all
              - workspace_billing:create
              - workspace_billing:read
              - workspace_billing:update
              - workspace_billing:delete
              - workspace_group_members:all
              - workspace_group_members:create
              - workspace_group_members:read
              - workspace_group_members:update
              - workspace_group_members:delete
              - workspace_members:all
              - workspace_members:create
              - workspace_members:read
              - workspace_members:update
              - workspace_members:delete
              - subsequences:all
              - subsequences:create
              - subsequences:read
              - subsequences:update
              - subsequences:delete
              - ai_sdr:all
              - ai_sdr:create
              - ai_sdr:read
              - ai_sdr:update
              - ai_sdr:delete
              - ai_sdr_replies:all
              - ai_sdr_replies:create
              - ai_sdr_replies:read
              - ai_sdr_replies:update
              - ai_sdr_replies:delete
              - ai_inbox_manager_analytics:all
              - ai_inbox_manager_analytics:create
              - ai_inbox_manager_analytics:read
              - ai_inbox_manager_analytics:update
              - ai_inbox_manager_analytics:delete
              - sales_flows:all
              - sales_flows:create
              - sales_flows:read
              - sales_flows:update
              - sales_flows:delete
              - webhooks:all
              - webhooks:create
              - webhooks:read
              - webhooks:update
              - webhooks:delete
              - webhook_events:all
              - webhook_events:create
              - webhook_events:read
              - webhook_events:update
              - webhook_events:delete
              - security_tokens:all
              - security_tokens:create
              - security_tokens:read
              - security_tokens:update
              - security_tokens:delete
              - dfy_email_account_orders:all
              - dfy_email_account_orders:create
              - dfy_email_account_orders:read
              - dfy_email_account_orders:update
              - dfy_email_account_orders:delete
              - auth:all
              - auth:create
              - auth:read
              - auth:update
              - auth:delete
            example: campaigns:create
        key:
          type: string
          readOnly: true
          example: a1b2c3d4e5f6g7h8i9j0
        organization_id:
          type: string
          readOnly: true
          format: uuid
          example: 019e18e2-78e4-716b-94f2-d262235af217
        timestamp_created:
          type: string
          readOnly: true
          format: date-time
          example: '2026-05-11T21:12:35.812Z'
        timestamp_updated:
          type: string
          readOnly: true
          format: date-time
          example: '2026-05-11T21:12:35.812Z'
      required:
        - id
        - name
        - scopes
        - key
        - organization_id
        - timestamp_created
        - timestamp_updated
      additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer

````