Redeem an enrollment code and register a device public key
const options = {
method: 'POST',
headers: {cookie: 'overlay_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
code: '<string>',
name: '<string>',
publicKey: '<string>',
hostVersion: '<string>',
platform: '<string>',
capabilities: {
protocolVersion: 1,
hostVersion: '<string>',
platform: '<string>',
adapters: [
{
id: '<string>',
displayName: '<string>',
supports: {prompt: true, approval: true, cancel: true, resume: true},
version: '<string>'
}
],
filesystem: {mode: 'selected_roots', roots: ['<string>']},
maxConcurrentRuns: 500
}
})
};
fetch('https://getoverlay.io/api/v1/agent-environments/enroll', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {cookie: 'overlay_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
code: '<string>',
name: '<string>',
publicKey: '<string>',
hostVersion: '<string>',
platform: '<string>',
capabilities: {
protocolVersion: 1,
hostVersion: '<string>',
platform: '<string>',
adapters: [
{
id: '<string>',
displayName: '<string>',
supports: {prompt: true, approval: true, cancel: true, resume: true},
version: '<string>'
}
],
filesystem: {mode: 'selected_roots', roots: ['<string>']},
maxConcurrentRuns: 500
}
})
};
fetch('https://getoverlay.io/api/v1/agent-environments/enroll', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://getoverlay.io/api/v1/agent-environments/enroll \
--header 'Content-Type: application/json' \
--cookie overlay_session= \
--data '
{
"code": "<string>",
"name": "<string>",
"publicKey": "<string>",
"hostVersion": "<string>",
"platform": "<string>",
"capabilities": {
"protocolVersion": 1,
"hostVersion": "<string>",
"platform": "<string>",
"adapters": [
{
"id": "<string>",
"displayName": "<string>",
"supports": {
"prompt": true,
"approval": true,
"cancel": true,
"resume": true
},
"version": "<string>"
}
],
"filesystem": {
"mode": "selected_roots",
"roots": [
"<string>"
]
},
"maxConcurrentRuns": 500
}
}
'"<unknown>"{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Agent environments
Redeem an enrollment code and register a device public key
POST
/
api
/
v1
/
agent-environments
/
enroll
Redeem an enrollment code and register a device public key
const options = {
method: 'POST',
headers: {cookie: 'overlay_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
code: '<string>',
name: '<string>',
publicKey: '<string>',
hostVersion: '<string>',
platform: '<string>',
capabilities: {
protocolVersion: 1,
hostVersion: '<string>',
platform: '<string>',
adapters: [
{
id: '<string>',
displayName: '<string>',
supports: {prompt: true, approval: true, cancel: true, resume: true},
version: '<string>'
}
],
filesystem: {mode: 'selected_roots', roots: ['<string>']},
maxConcurrentRuns: 500
}
})
};
fetch('https://getoverlay.io/api/v1/agent-environments/enroll', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {cookie: 'overlay_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
code: '<string>',
name: '<string>',
publicKey: '<string>',
hostVersion: '<string>',
platform: '<string>',
capabilities: {
protocolVersion: 1,
hostVersion: '<string>',
platform: '<string>',
adapters: [
{
id: '<string>',
displayName: '<string>',
supports: {prompt: true, approval: true, cancel: true, resume: true},
version: '<string>'
}
],
filesystem: {mode: 'selected_roots', roots: ['<string>']},
maxConcurrentRuns: 500
}
})
};
fetch('https://getoverlay.io/api/v1/agent-environments/enroll', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://getoverlay.io/api/v1/agent-environments/enroll \
--header 'Content-Type: application/json' \
--cookie overlay_session= \
--data '
{
"code": "<string>",
"name": "<string>",
"publicKey": "<string>",
"hostVersion": "<string>",
"platform": "<string>",
"capabilities": {
"protocolVersion": 1,
"hostVersion": "<string>",
"platform": "<string>",
"adapters": [
{
"id": "<string>",
"displayName": "<string>",
"supports": {
"prompt": true,
"approval": true,
"cancel": true,
"resume": true
},
"version": "<string>"
}
],
"filesystem": {
"mode": "selected_roots",
"roots": [
"<string>"
]
},
"maxConcurrentRuns": 500
}
}
'"<unknown>"{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
browserSessionbearerAuth
Signed httpOnly browser session cookie.
Body
application/json
Required string length:
16 - 512Required string length:
1 - 200Required string length:
64 - 8192Required string length:
1 - 100Required string length:
1 - 200Show child attributes
Show child attributes
Available options:
local, vps, overlay_cloud, external Response
Successful response. Stable response schemas are documented in workflow guides when available.
Response shape is route-specific and may be backed by @overlay/app-core contracts.