POST
/
v1
/
extensions
JavaScript
import Anchorbrowser from 'anchorbrowser';

const client = new Anchorbrowser({
  apiKey: 'sk-1jdfiaj0advpoaskdfpoks',
});

const response = await client.extensions.upload({
  file: fs.createReadStream('path/to/file'),
  name: 'My Custom Extension',
});

console.log(response.data);
{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "My Custom Extension",
    "manifest": {
      "name": "Extension Name",
      "version": "1.0.0",
      "manifest_version": 3,
      "description": "Extension description",
      "permissions": [
        "activeTab",
        "storage"
      ]
    },
    "createdAt": "2024-01-01T00:00:00.000Z",
    "updatedAt": "2024-01-01T00:00:00.000Z"
  }
}

Authorizations

anchor-api-key
string
header
required

API key passed in the header

Body

multipart/form-data

Response

200
application/json

Extension uploaded successfully

The response is of type object.