v1

latestOpenAPI 3.0.12026-07-26171200932.8 KB
Agent Portfolios

Update User Token

Rate limit: 60 requests per 60 seconds. This is the default shared quota — it is shared with every other endpoint that has no dedicated limit, so requests across those endpoints all draw from the same budget.


[DEPRECATED — use PATCH /api/v2/agent-portfolios/{agentPortfolioId}/user-tokens/{userTokenId} (scope names) instead] Updates the settings of an existing user token for a agent-portfolio. At least one field must be provided.

patch/api/v1/agent-portfolios/{agentPortfolioId}/user-tokens/{userTokenId}

Path parameters

agentPortfolioIdstring uuid required

The unique identifier of the agent-portfolio.

userTokenIdstring uuid required

The unique identifier of the user token to update.

Headers

x-request-idstring uuid required
Example:ff4572c4-eaeb-4169-86f2-a1a6bbc126bd

A unique request identifier.

x-api-keystring password required
Example:lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663

API key for authentication.

x-user-keystring password required
Example:eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_

User-specific authentication key.

Request body

scopeIdsinteger[]

[DEPRECATED — use scopeNames instead] An updated set of permission scope identifiers for the token. Available scopes: 200 = etoro-public:real:read, 201 = etoro-public:demo:read, 202 = etoro-public:real:write, 203 = etoro-public:demo:write.

scopeNamesstring[]

The set of permission scope names (preferred; replaces the deprecated scopeIds). Provide either scopeNames or scopeIds. Available scopes: etoro-public:real:read, etoro-public:demo:read, etoro-public:real:write, etoro-public:demo:write.

ipsWhiteliststring[]

An updated set of IPv4 addresses allowed to use this token.

expiresAtstring date-time

An updated expiration date and time (UTC) for the token.

Example request

{
  "scopeIds": [
    211,
    212
  ],
  "scopeNames": [
    "etoro-public:trade.real:read",
    "etoro-public:trade.real:write"
  ],
  "ipsWhitelist": [
    "192.168.1.1"
  ],
  "expiresAt": "2026-12-31T23:59:59Z"
}

Response

User token updated successfully