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

# DELETE /v1/p2p/listings/{id} — снятие P2P-листинга

> Снимите один из ваших активных листингов с P2P-маркета CSBoard.

Снимает с продажи один из ваших листингов в статусе `active`. В момент снятия листинг проверяется ещё раз, поэтому проданный секундой раньше будет отклонён, а не отменён из-под покупателя: проданный или продающийся листинг получает `409 listing_not_active`. Повторное снятие того же листинга даёт тот же `409`.

**Требуется аутентификация.** Отправьте ключ как `Authorization: Bearer csb_pub_...`. Учитывается в лимите P2P-записей ключа — 30 запросов в минуту.

## Пример запроса

```bash theme={null}
curl -X DELETE https://csboard.com/v1/p2p/listings/cm1xq8z4k0003ab12cd34ef56 \
  -H "Authorization: Bearer csb_pub_..."
```

## Пример ответа

```json theme={null}
{
  "id": "cm1xq8z4k0003ab12cd34ef56",
  "status": "cancelled"
}
```

## Коды ошибок

| HTTP-статус | Код | Значение |
| - | - | - |
| 403 | `listing_owner_mismatch` | Листинг принадлежит другому аккаунту. |
| 403 | `account_banned` / `ip_not_allowed` | Аккаунт заблокирован или запрос пришёл с адреса вне IP-allowlist ключа. |
| 404 | `listing_not_found` | Листинга с таким id нет. |
| 409 | `listing_not_active` | Листинг продан, находится в процессе продажи или уже снят. |
| 429 | `rate_limit_exceeded` | Больше 30 P2P-записей за эту минуту или превышен общий лимит ключа. Подождите время, указанное в заголовке `Retry-After`. |
| 503 | `p2p_disabled` | P2P-маркет сейчас отключён. |


## OpenAPI

````yaml DELETE /p2p/listings/{id}
openapi: 3.1.0
info:
  title: CSBoard API
  version: 1.0.0
  description: >-
    Market data over the CSBoard marketplace — live listings, floats, stickers,
    minAsk prices, FX rates — plus opt-in buying straight from your balance.
    Free to read, key-gated, built for automation.
  contact:
    name: CSBoard
    url: https://csboard.com/docs
servers:
  - url: https://csboard.com/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Status
    description: Liveness and freshness probes.
  - name: Market data
    description: Read the live catalog, prices, and FX rates.
  - name: Trading
    description: Buy listings from your CSBoard balance. Opt-in, key-gated.
  - name: P2P
    description: >-
      List your own CS2 skins on the CSBoard P2P market. Free — any valid key,
      no balance requirement.
  - name: Account
    description: Your balance, settled funds, and trading status.
  - name: Webhooks
    description: Register an endpoint and receive signed order updates instead of polling.
paths:
  /p2p/listings/{id}:
    delete:
      tags:
        - P2P
      summary: Remove a listing
      description: >-
        Take one of your `active` listings off the market. A listing that has
        already sold or is mid-sale cannot be removed and answers `409
        listing_not_active`; removing it twice answers the same. Counts toward
        the 30 requests/minute P2P write limit of the key.
      operationId: deleteP2PListing
      parameters:
        - name: id
          in: path
          required: true
          description: Listing id from `POST /p2p/listings` or `GET /p2p/listings`.
          schema:
            type: string
      responses:
        '200':
          description: Removed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                    enum:
                      - cancelled
                required:
                  - id
                  - status
              example:
                id: cm1xq8z4k0003ab12cd34ef56
                status: cancelled
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            Forbidden — not your listing, an account ban, or the key's IP
            allowlist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                listing_owner_mismatch:
                  summary: Someone else's listing
                  value:
                    code: listing_owner_mismatch
                    detail: Listing belongs to another account
                account_banned:
                  summary: Account banned
                  value:
                    code: account_banned
                    detail: This account is banned.
                ip_not_allowed:
                  summary: Request from outside the key's IP allowlist
                  value:
                    code: ip_not_allowed
                    detail: >-
                      This API key is restricted to an IP allowlist and
                      203.0.113.7 is not on it. Update it at
                      https://csboard.com/profile?tab=api
        '404':
          description: No such listing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                listing_not_found:
                  summary: Not found
                  value:
                    code: listing_not_found
                    detail: Listing not found
        '409':
          description: The listing is not `active` any more.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                listing_not_active:
                  summary: Sold, mid-sale or already removed
                  value:
                    code: listing_not_active
                    detail: Only active listings can be unpublished
        '429':
          $ref: '#/components/responses/P2PWriteLimited'
        '503':
          $ref: '#/components/responses/P2PDisabled'
components:
  responses:
    Unauthorized:
      description: Missing or invalid API key (`missing_api_key` or `invalid_api_key`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: missing_api_key
            detail: >-
              Provide your API key via `Authorization: Bearer csb_pub_…`.
              Generate one at https://csboard.com/profile?tab=api
    P2PWriteLimited:
      description: >-
        More than 30 P2P writes (publish, reprice, remove) in the current minute
        on this key. Wait `Retry-After` seconds.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: rate_limit_exceeded
            detail: P2P write limit of 30/min exceeded.
    P2PDisabled:
      description: The P2P market is switched off.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            p2p_disabled:
              summary: P2P market unavailable
              value:
                code: p2p_disabled
                detail: The P2P market is not available right now.
  schemas:
    Error:
      type: object
      description: >-
        All errors return { code, detail }. Some carry extra fields (e.g.
        price_moved adds current_total_usd, insufficient_balance adds
        required_usd/current_usd).
      properties:
        code:
          type: string
          description: >-
            Machine-readable error code, e.g. rate_limit_exceeded,
            trading_not_enabled, price_moved.
        detail:
          type: string
          description: Human-readable explanation.
      required:
        - code
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send your key as a Bearer token on every request: `Authorization: Bearer
        csb_pub_...`. Generate keys in your CSBoard profile.

````

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