> For the complete documentation index, see [llms.txt](https://docs.lighter.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lighter.xyz/api/api-keys/setmakeronlyapikeys.md).

# setMakerOnlyApiKeys

Set maker-only API key indexes. This replaces the current list; pass all indexes you want marked as maker-only. Pass \[] to clear all maker-only restrictions.

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"tags":[{"name":"api-keys"}],"servers":[{"url":"https://mainnet.zklighter.elliot.ai","description":"Lighter mainnet"},{"url":"https://testnet.zklighter.elliot.ai","description":"Lighter testnet"},{"url":"https://api.rh.lighter.xyz","description":"Lighter on Robinhood Chain mainnet"},{"url":"https://api.rh-testnet.lighter.xyz","description":"Lighter on Robinhood Chain testnet"}],"paths":{"/api/v1/setMakerOnlyApiKeys":{"post":{"summary":"setMakerOnlyApiKeys","operationId":"setMakerOnlyApiKeys","tags":["api-keys"],"description":"Set maker-only API key indexes. This replaces the current list; pass all indexes you want marked as maker-only. Pass [] to clear all maker-only restrictions.","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ReqSetMakerOnlyApiKeys"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ReqSetMakerOnlyApiKeys"}}}},"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespSetMakerOnlyApiKeys"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultCode"}}}}}}}},"components":{"schemas":{"ReqSetMakerOnlyApiKeys":{"type":"object","title":"ReqSetMakerOnlyApiKeys","description":"Send as form data, not JSON. The value replaces the full maker-only API key list; use [] to clear all restrictions.","properties":{"account_index":{"type":"integer","format":"int64"},"api_key_indexes":{"type":"string","description":"JSON array string of API key indexes, e.g. \"[4,5]\". Use [] to clear all maker-only restrictions."}},"required":["account_index","api_key_indexes"]},"RespSetMakerOnlyApiKeys":{"type":"object","title":"RespSetMakerOnlyApiKeys","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}},"required":["code"]},"ResultCode":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}},"title":"ResultCode","required":["code"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lighter.xyz/api/api-keys/setmakeronlyapikeys.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
