Create a share link
POST
/api/v1/draft-shares
const url = 'https://api.deploybase.eu/api/v1/api/v1/draft-shares';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"deployment_id":"example","expires_in":"example","password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.deploybase.eu/api/v1/api/v1/draft-shares \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "deployment_id": "example", "expires_in": "example", "password": "example" }'Creates a Share Link for one deployment of the active team, optionally password-protected and expiring (24h, 7d or 30d).
Authorizations
Section titled “ Authorizations ”Request Body
Section titled “ Request Body ”Deployment, optional password and expiry
Media type application/json
object
deployment_id
required
string
expires_in
string
password
string
Example generated
{ "deployment_id": "example", "expires_in": "example", "password": "example"}Responses
Section titled “ Responses ”Created
Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string
data
object
created_at
string
created_by_email
string
deployment_id
string
expires_at
string
id
string
preview_url
string
project_id
string
revoked_at
string
share_token
string
team_id
string
updated_at
string
Example generated
{ "data": { "created_at": "example", "created_by_email": "example", "deployment_id": "example", "expires_at": "example", "id": "example", "preview_url": "example", "project_id": "example", "revoked_at": "example", "share_token": "example", "team_id": "example", "updated_at": "example" }, "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Bad Request
Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Unauthorized
Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}PLAN_LIMIT_EXCEEDED: active share link limit reached
Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}FORBIDDEN when the role is too low; DEPLOYS_PAUSED_FOR_REVIEW when the team is held for review by a suspension case (deploys paused, sites keep serving), ACCOUNT_SUSPENDED when it is suspended
Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Not Found
Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Live f79d25b6 built