> ## Documentation Index
> Fetch the complete documentation index at: https://docs.skyfire.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Agent's Service

Update a seller service that belongs to the agent.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "skyfire-agent-and-token-apis",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.skyfire.xyz"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "skyfire-api-key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/api/v1/agents/seller-services/{sellerServiceId}": {
      "patch": {
        "summary": "Update Agent's Service",
        "description": "Update a seller service that belongs to the agent.",
        "operationId": "update-agents-service",
        "parameters": [
          {
            "name": "sellerServiceId",
            "in": "path",
            "description": "The ID of the seller service to update.",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "New name of the service."
                  },
                  "description": {
                    "type": "string",
                    "description": "New description of the service."
                  },
                  "tags": {
                    "type": "array",
                    "description": "New tags for the service.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "minimumTokenAmount": {
                    "type": "string",
                    "description": "New minimum amount (in USD) that buyer's must set on their tokens."
                  },
                  "price": {
                    "type": "string",
                    "description": "New price of the service in USD."
                  },
                  "termsOfService": {
                    "type": "object",
                    "description": "New terms of service for this service.",
                    "properties": {
                      "url": {
                        "type": "string",
                        "description": "The URL where the terms of service are available to review."
                      },
                      "required": {
                        "type": "boolean",
                        "description": "'true' if acceptance of the terms of service is required."
                      }
                    }
                  },
                  "acceptedTokens": {
                    "type": "string",
                    "description": "List of KYAPay token types that this Seller Service accepts. Must be one or more of 'kya', 'pay' and 'kya-pay'."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "204",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n    <meta charset=\"utf-8\">\n    <title>Error</title>\n</head>\n\n<body>\n    <pre>Bad Request</pre>\n</body>\n\n</html>"
                  }
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Validation Error\",\n    \"details\": {\n        \"id\": {\n            \"message\": \"Must be a valid UUID\"\n        }\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "VALIDATION_ERROR"
                    },
                    "message": {
                      "type": "string",
                      "example": "Validation Error"
                    },
                    "details": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "object",
                          "properties": {
                            "message": {
                              "type": "string",
                              "example": "Must be a valid UUID"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl --location --request PATCH 'https://api.skyfire.xyz/api/v1/agents/seller-services/deeafae8-b98f-40a2-ad62-4fbe22334d89' \\\n--header 'skyfire-api-key: 72fa67b7-961e-4535-8bf5-b8c44bf4a155' \\\n--header 'Content-Type: application/json' \\\n--data '{\n    \"name\": \"Enhanced Weather Data API Service\",\n    \"description\": \"Updated weather service with additional features including severe weather alerts and air quality data.\",\n    \"tags\": [\n        \"weather\",\n        \"api\",\n        \"data\",\n        \"forecasting\",\n        \"alerts\"\n    ],\n    \"minimumTokenAmount\": \"0.025\",\n    \"price\": \"0.025\",\n    \"termsOfService\": {\n        \"url\": \"https://weatherservice.com/updated-terms\",\n        \"required\": true\n    },\n\t\t\"acceptedTokens\": [\"kya\"]\n}'"
            },
            {
              "language": "node",
              "code": "var https = require('follow-redirects').https;\nvar fs = require('fs');\n\nvar options = {\n  'method': 'PATCH',\n  'hostname': 'api.skyfire.xyz',\n  'path': '/api/v1/agents/seller-services/deeafae8-b98f-40a2-ad62-4fbe22334d89',\n  'headers': {\n    'skyfire-api-key': '72fa67b7-961e-4535-8bf5-b8c44bf4a155',\n    'Content-Type': 'application/json'\n  },\n  'maxRedirects': 20\n};\n\nvar req = https.request(options, function (res) {\n  var chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function (chunk) {\n    var body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n\n  res.on(\"error\", function (error) {\n    console.error(error);\n  });\n});\n\nvar postData = JSON.stringify({\n  \"name\": \"Enhanced Weather Data API Service\",\n  \"description\": \"Updated weather service with additional features including severe weather alerts and air quality data.\",\n  \"tags\": [\n    \"weather\",\n    \"api\",\n    \"data\",\n    \"forecasting\",\n    \"alerts\"\n  ],\n  \"minimumTokenAmount\": \"0.025\",\n  \"price\": \"0.025\",\n  \"termsOfService\": {\n    \"url\": \"https://weatherservice.com/updated-terms\",\n    \"required\": true\n  },\n  \"acceptedTokens\": [\"kya\"]\n});\n\nreq.write(postData);\n\nreq.end();"
            },
            {
              "language": "python",
              "code": "import http.client\nimport json\n\nconn = http.client.HTTPSConnection(\"api.skyfire.xyz\")\npayload = json.dumps({\n  \"name\": \"Enhanced Weather Data API Service\",\n  \"description\": \"Updated weather service with additional features including severe weather alerts and air quality data.\",\n  \"tags\": [\n    \"weather\",\n    \"api\",\n    \"data\",\n    \"forecasting\",\n    \"alerts\"\n  ],\n  \"minimumTokenAmount\": \"0.025\",\n  \"price\": \"0.025\",\n  \"termsOfService\": {\n    \"url\": \"https://weatherservice.com/updated-terms\",\n    \"required\": True\n  },\n  \"acceptedTokens\": [\"kya\"]\n})\nheaders = {\n  'skyfire-api-key': '72fa67b7-961e-4535-8bf5-b8c44bf4a155',\n  'Content-Type': 'application/json'\n}\nconn.request(\"PATCH\", \"/api/v1/agents/seller-services/deeafae8-b98f-40a2-ad62-4fbe22334d89\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))"
            }
          ],
          "samples-languages": [
            "curl",
            "node",
            "python"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "skyfire-api-key",
        "value": "<Your Skyfire Agent Account API Key>"
      }
    ],
    "explorer-enabled": false,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true
}
```