Skip to main content
GET
/
agent-websites
List agent websites
curl --request GET \
  --url https://app.phonely.ai/api/agent-websites \
  --header 'X-Authorization: <api-key>'
{
  "websites": [
    {
      "id": "<string>",
      "agentId": "<string>",
      "name": "<string>",
      "url": "<string>",
      "active": true,
      "content": "<string>",
      "contentMD": "<string>",
      "lastUpdatedBy": "<string>",
      "lastUpdatedAt": "2023-11-07T05:31:56Z"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.phonely.ai/llms.txt

Use this file to discover all available pages before exploring further.

Manages website URLs associated with an agent’s knowledge base. This endpoint supports GET, POST, and DELETE operations.

List Websites

Method: GET
Endpoint: /api/agent-websites
Headers:
  • X-Authorization: Your API key (required)
Query Parameters:
  • uid (string, required): Your user ID
  • agentId (string, required): The ID of the agent
Response:
{
  "websites": [
    {
      "id": "string",
      "url": "string",
      "active": boolean,
      "lastUpdatedBy": "string",
      "lastUpdatedAt": "string"
    }
  ]
}

Add Website

Method: POST
Endpoint: /api/agent-websites
Headers:
  • X-Authorization: Your API key (required)
  • Content-Type: application/json
Request Body:
{
  "uid": "string",
  "agentId": "string",
  "url": "string"
}
Response:
{
  "websiteId": "string",
  "message": "Website added successfully"
}

Delete Website

Method: DELETE
Endpoint: /api/agent-websites
Headers:
  • X-Authorization: Your API key (required)
Query Parameters:
  • uid (string, required): Your user ID
  • agentId (string, required): The ID of the agent
  • websiteId (string, required): The ID of the website to delete
Response:
{
  "message": "Website deleted successfully"
}

Error Responses

  • 400 Bad Request: Invalid request parameters or invalid URL
  • 401 Unauthorized: Invalid or missing API key, or insufficient permissions
  • 404 Not Found: Website not found (for DELETE operations)
  • 500 Internal Server Error: Server error

Examples

List websites:
curl -X GET "https://app.phonely.ai/api/agent-websites?uid=user123&agentId=agent456" \
  -H "X-Authorization: your-api-key"
Add website:
curl -X POST https://app.phonely.ai/api/agent-websites \
  -H "X-Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "uid": "user123",
    "agentId": "agent456",
    "url": "https://example.com"
  }'
Delete website:
curl -X DELETE "https://app.phonely.ai/api/agent-websites?uid=user123&agentId=agent456&websiteId=web789" \
  -H "X-Authorization: your-api-key"

Authorizations

X-Authorization
string
header
required

Query Parameters

uid
string
required

User ID

agentId
string
required

Agent ID

Response

List of websites

websites
object[]