curl --request PATCH \
--url https://odyssey.asteroid.ai/agents/v2/profiles/{profileId} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"cookiesToAdd": [
{
"domain": "<string>",
"httpOnly": true,
"key": "<string>",
"name": "<string>",
"secure": true,
"value": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiry": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"cookiesToDelete": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"credentialsToAdd": [
{
"data": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"credentialsToDelete": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"credentialsToUpdate": [
{
"data": "<string>",
"name": "<string>"
}
],
"description": "<string>",
"fingerprintId": "<string>",
"inboxEmailPrefix": "<string>",
"name": "<string>",
"secretIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"secretIdsToAdd": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"secretIdsToRemove": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"stickyIP": true,
"tracingEnabled": true,
"vaultItemIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"vaultItemIdsToAdd": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"vaultItemIdsToRemove": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://odyssey.asteroid.ai/agents/v2/profiles/{profileId}"
payload = {
"cookiesToAdd": [
{
"domain": "<string>",
"httpOnly": True,
"key": "<string>",
"name": "<string>",
"secure": True,
"value": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiry": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"cookiesToDelete": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"credentialsToAdd": [
{
"data": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"credentialsToDelete": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"credentialsToUpdate": [
{
"data": "<string>",
"name": "<string>"
}
],
"description": "<string>",
"fingerprintId": "<string>",
"inboxEmailPrefix": "<string>",
"name": "<string>",
"secretIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"secretIdsToAdd": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"secretIdsToRemove": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"stickyIP": True,
"tracingEnabled": True,
"vaultItemIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"vaultItemIdsToAdd": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"vaultItemIdsToRemove": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cookiesToAdd: [
{
domain: '<string>',
httpOnly: true,
key: '<string>',
name: '<string>',
secure: true,
value: '<string>',
createdAt: '2023-11-07T05:31:56Z',
expiry: '2023-11-07T05:31:56Z',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
cookiesToDelete: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
credentialsToAdd: [
{
data: '<string>',
name: '<string>',
createdAt: '2023-11-07T05:31:56Z',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
credentialsToDelete: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
credentialsToUpdate: [{data: '<string>', name: '<string>'}],
description: '<string>',
fingerprintId: '<string>',
inboxEmailPrefix: '<string>',
name: '<string>',
secretIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
secretIdsToAdd: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
secretIdsToRemove: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
stickyIP: true,
tracingEnabled: true,
vaultItemIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
vaultItemIdsToAdd: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
vaultItemIdsToRemove: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://odyssey.asteroid.ai/agents/v2/profiles/{profileId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://odyssey.asteroid.ai/agents/v2/profiles/{profileId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'cookiesToAdd' => [
[
'domain' => '<string>',
'httpOnly' => true,
'key' => '<string>',
'name' => '<string>',
'secure' => true,
'value' => '<string>',
'createdAt' => '2023-11-07T05:31:56Z',
'expiry' => '2023-11-07T05:31:56Z',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'cookiesToDelete' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'credentialsToAdd' => [
[
'data' => '<string>',
'name' => '<string>',
'createdAt' => '2023-11-07T05:31:56Z',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'credentialsToDelete' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'credentialsToUpdate' => [
[
'data' => '<string>',
'name' => '<string>'
]
],
'description' => '<string>',
'fingerprintId' => '<string>',
'inboxEmailPrefix' => '<string>',
'name' => '<string>',
'secretIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'secretIdsToAdd' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'secretIdsToRemove' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'stickyIP' => true,
'tracingEnabled' => true,
'vaultItemIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'vaultItemIdsToAdd' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'vaultItemIdsToRemove' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://odyssey.asteroid.ai/agents/v2/profiles/{profileId}"
payload := strings.NewReader("{\n \"cookiesToAdd\": [\n {\n \"domain\": \"<string>\",\n \"httpOnly\": true,\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"secure\": true,\n \"value\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"expiry\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"cookiesToDelete\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"credentialsToAdd\": [\n {\n \"data\": \"<string>\",\n \"name\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"credentialsToDelete\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"credentialsToUpdate\": [\n {\n \"data\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"fingerprintId\": \"<string>\",\n \"inboxEmailPrefix\": \"<string>\",\n \"name\": \"<string>\",\n \"secretIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"secretIdsToAdd\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"secretIdsToRemove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"stickyIP\": true,\n \"tracingEnabled\": true,\n \"vaultItemIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"vaultItemIdsToAdd\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"vaultItemIdsToRemove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://odyssey.asteroid.ai/agents/v2/profiles/{profileId}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cookiesToAdd\": [\n {\n \"domain\": \"<string>\",\n \"httpOnly\": true,\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"secure\": true,\n \"value\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"expiry\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"cookiesToDelete\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"credentialsToAdd\": [\n {\n \"data\": \"<string>\",\n \"name\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"credentialsToDelete\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"credentialsToUpdate\": [\n {\n \"data\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"fingerprintId\": \"<string>\",\n \"inboxEmailPrefix\": \"<string>\",\n \"name\": \"<string>\",\n \"secretIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"secretIdsToAdd\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"secretIdsToRemove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"stickyIP\": true,\n \"tracingEnabled\": true,\n \"vaultItemIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"vaultItemIdsToAdd\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"vaultItemIdsToRemove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://odyssey.asteroid.ai/agents/v2/profiles/{profileId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cookiesToAdd\": [\n {\n \"domain\": \"<string>\",\n \"httpOnly\": true,\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"secure\": true,\n \"value\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"expiry\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"cookiesToDelete\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"credentialsToAdd\": [\n {\n \"data\": \"<string>\",\n \"name\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"credentialsToDelete\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"credentialsToUpdate\": [\n {\n \"data\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"fingerprintId\": \"<string>\",\n \"inboxEmailPrefix\": \"<string>\",\n \"name\": \"<string>\",\n \"secretIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"secretIdsToAdd\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"secretIdsToRemove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"stickyIP\": true,\n \"tracingEnabled\": true,\n \"vaultItemIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"vaultItemIdsToAdd\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"vaultItemIdsToRemove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"cookies": [
{
"domain": "<string>",
"httpOnly": true,
"key": "<string>",
"name": "<string>",
"sameSite": "Strict",
"secure": true,
"value": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiry": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"credentials": [
{
"data": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"description": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"inboxEmail": "<string>",
"name": "<string>",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stickyIP": true,
"tracingEnabled": true,
"updatedAt": "2023-11-07T05:31:56Z",
"vaultItems": [
{
"fields": [
{
"key": "<string>",
"placeholder": "<string>",
"type": "username",
"legacyPlaceholder": "<string>"
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"itemKey": "<string>",
"kind": "login",
"name": "<string>"
}
],
"fingerprintId": "<string>",
"inboxEmailPrefix": "<string>"
}{
"code": 400,
"message": "<string>",
"detail": "<string>",
"errors": [
{
"detail": "<string>",
"parameter": "<string>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": 401,
"message": "<string>",
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": 403,
"message": "<string>",
"capability": "<string>",
"detail": "<string>",
"instance": "<string>",
"reason": "capability_required",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": 404,
"message": "<string>",
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": 409,
"message": "<string>",
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": 500,
"message": "<string>",
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Update Profile
Update an existing profile. 409 when two attached secrets share a key.
curl --request PATCH \
--url https://odyssey.asteroid.ai/agents/v2/profiles/{profileId} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"cookiesToAdd": [
{
"domain": "<string>",
"httpOnly": true,
"key": "<string>",
"name": "<string>",
"secure": true,
"value": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiry": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"cookiesToDelete": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"credentialsToAdd": [
{
"data": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"credentialsToDelete": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"credentialsToUpdate": [
{
"data": "<string>",
"name": "<string>"
}
],
"description": "<string>",
"fingerprintId": "<string>",
"inboxEmailPrefix": "<string>",
"name": "<string>",
"secretIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"secretIdsToAdd": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"secretIdsToRemove": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"stickyIP": true,
"tracingEnabled": true,
"vaultItemIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"vaultItemIdsToAdd": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"vaultItemIdsToRemove": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://odyssey.asteroid.ai/agents/v2/profiles/{profileId}"
payload = {
"cookiesToAdd": [
{
"domain": "<string>",
"httpOnly": True,
"key": "<string>",
"name": "<string>",
"secure": True,
"value": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiry": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"cookiesToDelete": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"credentialsToAdd": [
{
"data": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"credentialsToDelete": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"credentialsToUpdate": [
{
"data": "<string>",
"name": "<string>"
}
],
"description": "<string>",
"fingerprintId": "<string>",
"inboxEmailPrefix": "<string>",
"name": "<string>",
"secretIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"secretIdsToAdd": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"secretIdsToRemove": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"stickyIP": True,
"tracingEnabled": True,
"vaultItemIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"vaultItemIdsToAdd": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"vaultItemIdsToRemove": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cookiesToAdd: [
{
domain: '<string>',
httpOnly: true,
key: '<string>',
name: '<string>',
secure: true,
value: '<string>',
createdAt: '2023-11-07T05:31:56Z',
expiry: '2023-11-07T05:31:56Z',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
cookiesToDelete: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
credentialsToAdd: [
{
data: '<string>',
name: '<string>',
createdAt: '2023-11-07T05:31:56Z',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
credentialsToDelete: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
credentialsToUpdate: [{data: '<string>', name: '<string>'}],
description: '<string>',
fingerprintId: '<string>',
inboxEmailPrefix: '<string>',
name: '<string>',
secretIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
secretIdsToAdd: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
secretIdsToRemove: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
stickyIP: true,
tracingEnabled: true,
vaultItemIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
vaultItemIdsToAdd: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
vaultItemIdsToRemove: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://odyssey.asteroid.ai/agents/v2/profiles/{profileId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://odyssey.asteroid.ai/agents/v2/profiles/{profileId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'cookiesToAdd' => [
[
'domain' => '<string>',
'httpOnly' => true,
'key' => '<string>',
'name' => '<string>',
'secure' => true,
'value' => '<string>',
'createdAt' => '2023-11-07T05:31:56Z',
'expiry' => '2023-11-07T05:31:56Z',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'cookiesToDelete' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'credentialsToAdd' => [
[
'data' => '<string>',
'name' => '<string>',
'createdAt' => '2023-11-07T05:31:56Z',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'credentialsToDelete' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'credentialsToUpdate' => [
[
'data' => '<string>',
'name' => '<string>'
]
],
'description' => '<string>',
'fingerprintId' => '<string>',
'inboxEmailPrefix' => '<string>',
'name' => '<string>',
'secretIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'secretIdsToAdd' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'secretIdsToRemove' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'stickyIP' => true,
'tracingEnabled' => true,
'vaultItemIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'vaultItemIdsToAdd' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'vaultItemIdsToRemove' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://odyssey.asteroid.ai/agents/v2/profiles/{profileId}"
payload := strings.NewReader("{\n \"cookiesToAdd\": [\n {\n \"domain\": \"<string>\",\n \"httpOnly\": true,\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"secure\": true,\n \"value\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"expiry\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"cookiesToDelete\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"credentialsToAdd\": [\n {\n \"data\": \"<string>\",\n \"name\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"credentialsToDelete\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"credentialsToUpdate\": [\n {\n \"data\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"fingerprintId\": \"<string>\",\n \"inboxEmailPrefix\": \"<string>\",\n \"name\": \"<string>\",\n \"secretIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"secretIdsToAdd\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"secretIdsToRemove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"stickyIP\": true,\n \"tracingEnabled\": true,\n \"vaultItemIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"vaultItemIdsToAdd\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"vaultItemIdsToRemove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://odyssey.asteroid.ai/agents/v2/profiles/{profileId}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cookiesToAdd\": [\n {\n \"domain\": \"<string>\",\n \"httpOnly\": true,\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"secure\": true,\n \"value\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"expiry\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"cookiesToDelete\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"credentialsToAdd\": [\n {\n \"data\": \"<string>\",\n \"name\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"credentialsToDelete\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"credentialsToUpdate\": [\n {\n \"data\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"fingerprintId\": \"<string>\",\n \"inboxEmailPrefix\": \"<string>\",\n \"name\": \"<string>\",\n \"secretIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"secretIdsToAdd\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"secretIdsToRemove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"stickyIP\": true,\n \"tracingEnabled\": true,\n \"vaultItemIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"vaultItemIdsToAdd\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"vaultItemIdsToRemove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://odyssey.asteroid.ai/agents/v2/profiles/{profileId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cookiesToAdd\": [\n {\n \"domain\": \"<string>\",\n \"httpOnly\": true,\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"secure\": true,\n \"value\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"expiry\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"cookiesToDelete\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"credentialsToAdd\": [\n {\n \"data\": \"<string>\",\n \"name\": \"<string>\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"credentialsToDelete\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"credentialsToUpdate\": [\n {\n \"data\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"description\": \"<string>\",\n \"fingerprintId\": \"<string>\",\n \"inboxEmailPrefix\": \"<string>\",\n \"name\": \"<string>\",\n \"secretIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"secretIdsToAdd\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"secretIdsToRemove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"stickyIP\": true,\n \"tracingEnabled\": true,\n \"vaultItemIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"vaultItemIdsToAdd\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"vaultItemIdsToRemove\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"cookies": [
{
"domain": "<string>",
"httpOnly": true,
"key": "<string>",
"name": "<string>",
"sameSite": "Strict",
"secure": true,
"value": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiry": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"credentials": [
{
"data": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"description": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"inboxEmail": "<string>",
"name": "<string>",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stickyIP": true,
"tracingEnabled": true,
"updatedAt": "2023-11-07T05:31:56Z",
"vaultItems": [
{
"fields": [
{
"key": "<string>",
"placeholder": "<string>",
"type": "username",
"legacyPlaceholder": "<string>"
}
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"itemKey": "<string>",
"kind": "login",
"name": "<string>"
}
],
"fingerprintId": "<string>",
"inboxEmailPrefix": "<string>"
}{
"code": 400,
"message": "<string>",
"detail": "<string>",
"errors": [
{
"detail": "<string>",
"parameter": "<string>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": 401,
"message": "<string>",
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": 403,
"message": "<string>",
"capability": "<string>",
"detail": "<string>",
"instance": "<string>",
"reason": "capability_required",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": 404,
"message": "<string>",
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": 409,
"message": "<string>",
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": 500,
"message": "<string>",
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Authorizations
Path Parameters
Body
Request to update an existing agent profile
Show child attributes
Show child attributes
Deprecated: use secretIds. Credentials to add to the profile.
Show child attributes
Show child attributes
Deprecated: use secretIds. IDs of credentials to remove from the profile.
Deprecated: use secretIds. Credentials to update by name (matched case-insensitively).
Show child attributes
Show child attributes
1000Anchor browser fingerprint ID to apply at session create (admin only). Ignored unless the environment runs with extra stealth and an active proxy without sticky IP. An empty string clears it; omit to leave unchanged. Null is rejected — the generated servers cannot tell null from an omitted field, so accepting it would turn an intended clear into a silent no-op.
^([a-fA-F0-9]{24})?$Optional custom prefix for the agent's inbox email address. If set, the inbox will be {prefix}@agentmail.asteroid.ai.
1 - 255Secret IDs attached to this profile. Replaces the full list. To change part of it, use secretIdsToAdd and secretIdsToRemove.
Secret IDs to attach. Secrets already attached stay. Cannot be combined with secretIds.
Secret IDs to detach. IDs that are not attached are ignored. Applied before secretIdsToAdd. Cannot be combined with secretIds.
Turn the dedicated IP on or off. A change clears the profile's saved browser state, and is refused while a run uses the profile.
Whether browser tracing is enabled (admin only)
Deprecated: use secretIds.
Deprecated: use secretIdsToAdd.
Deprecated: use secretIdsToRemove.
Response
The request has succeeded.
An agent profile: who an agent signs in as. Credentials, cookies and an inbox. The environment it runs on is the workflow's choice.
Show child attributes
Show child attributes
Deprecated: Use vaultItems instead. Legacy credential names mirrored from attached vault items (legacyName). Prefer vaultItems; ##NAME## remains a grace-period alias.
Show child attributes
Show child attributes
The resolved inbox email address for this profile
Name of the agent profile (unique within organization)
The ID of the organization that owns this profile
Whether browser runs on this profile egress from one dedicated IP. Applies when the environment uses the managed proxy or no proxy.
Whether browser tracing is enabled (admin only)
Org vault items attached to this profile. Deleted items are omitted.
Show child attributes
Show child attributes
Anchor browser fingerprint ID applied at session create (admin only). Absent or null when unset.
Optional custom prefix for the agent's inbox email address. If set, the inbox will be {prefix}@agentmail.asteroid.ai. If not set, defaults to the first 8 characters of the profile ID.

