---
title: "Accept a pending image share"
method: POST
path: "/pending-image-shares/{pendingShareId}/accept"
tags: ["images"]
---

# Accept a pending image share

`POST /pending-image-shares/{pendingShareId}/accept`

## Request

- Base URL: `https://api.blaxel.ai/v0`
- URL: `https://api.blaxel.ai/v0/pending-image-shares/{pendingShareId}/accept`
- Auth: one of:
  - OAuth 2
    - Authorization code: `/oauth/authorize`
    - Client credentials
    - Token URL: `/oauth/token` scopes: `images:share`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/blaxel/apis/blaxel-control-plane/docs/pending-image-shares/:pendingShareId/accept/post.ts> (a function with typed inputs; its response is checked against the schema)

Accepts a pending cross-account image share and copies the image metadata to the target workspace. Caller must be an admin of the target workspace.

## Query parameters

- `force` boolean

## Response `200`

successful operation

- Image
  - `metadata` ImageMetadata, required
    - `createdAt` string: The date and time when the image was created.
    - `displayName` string: The display name of the image (registry/workspace/repository).
    - `events` CoreEvent[]: Events happening on a resource deployed on Blaxel
      - `canaryRevision` string: Canary revisionID link to the event
      - `message` string: Event message
      - `revision` string: RevisionID link to the event
      - `status` string: Event status
      - `time` string: Event time
      - `type` string: Event type
    - `lastDeployedAt` string: The date and time when the image was last deployed (most recent across all tags).
    - `name` string: The name of the image (repository name).
    - `resourceType` string: The resource type of the image.
    - `sourceWorkspace` string: If this image is shared from another workspace, this field contains the name of the source workspace. Empty for non-shared images.
    - `status` 'DELETING' | 'TERMINATED' | 'FAILED' | 'DEACTIVATED' | 'DEACTIVATING' | 'UPLOADING' | 'BUILDING' | 'DEPLOYING' | 'DEPLOYED' | 'BUILT': Deployment status of a resource deployed on Blaxel
    - `updatedAt` string: The date and time when the image was last updated.
    - `workspace` string: The workspace of the image.
  - `spec` ImageSpec, required
    - `size` integer: The size of the image in bytes.
    - `tags` ImageTag[]: List of tags available for this image.
      - `createdAt` string: The date and time when the tag was created.
      - `name` string: The name of the tag.
      - `size` integer: The size of the image in bytes.
      - `updatedAt` string: The date and time when the tag was last updated.

## Other responses

- `403`: forbidden
- `404`: pending image share not found
- `409`: image conflict in target workspace
- `410`: pending image share expired

---

[API](https://skmtc.dev/blaxel/apis/blaxel-control-plane.md) - [All operations](https://skmtc.dev/blaxel/apis/blaxel-control-plane/llms.txt) - [OpenAPI document](https://skmtc.dev/blaxel/apis/blaxel-control-plane/revisions/dfa264bc72ee?raw)
