Apidog's cookie manager allows you to view, create, edit, and manage cookies linked to various domains. These cookies are stored within Apidog and automatically included when making requests to their associated domains. This guide explains how to effectively manage cookies for API testing.Understanding Cookies#
A cookie is a package of data sent from a website and stored on the user's computer by the user's web browser while the user is browsing. Cookies are designed to be a reliable mechanism for websites to remember stateful information (such as items added to the shopping cart in an online store) or to record the user's browsing activity.Cookie Components#
Cookies typically contain two essential pieces of information:| Component | Description |
|---|
| Site Name | The domain that created the cookie |
| User ID | A unique identifier for the user |
When you return to a site, it can read the cookie to remember you and your preferences and adapt its content accordingly. Without cookies, you would need to log in anew after leaving a site or recreate your shopping cart if you exit a page.Cookie Management Workflow#
| Action | Purpose | How to Access |
|---|
| View Cookies | See all cookies for different domains | Open cookie manager from bottom right corner |
| Create Cookie | Add a new cookie for a domain | Click "+ New" in cookie manager |
| Edit Cookie | Modify existing cookie attributes | Select cookie, make changes, click "Save" |
| Delete Cookie | Remove a specific cookie | Click "Delete" next to the cookie |
| Clear All | Remove all cookies and domains | Click "Clear All" in cookie manager |
| Send Cookie | Automatically include cookie in requests | Cookie appears in Headers tab for matching domains |
Using the Cookie Manager#
In the bottom right corner of the Apidog interface, you can see a " Cookies" button. Click it to open the Cookies pop-up window.Viewing Cookies#
In the Cookies window, you can see a list of domains and their related cookies. Each cookie displays its key attributes including name, value, domain, path, and expiration settings.Creating a Cookie#
To create a new cookie for a domain, click "+ New".Apidog supports the following cookie attributes:| Attribute | Description | Example/Notes |
|---|
| Domain | The domain to which Apidog will send the cookie | example.com (do not include the protocol) |
| Name | The name of the cookie | session_id, user_token |
| Value | The value of the cookie | abc123xyz, user@example.com |
| Path | The URL path to which the cookie is limited | / sends the cookie to all requests within that domain |
| Expires | The date and time after which the cookie will no longer be sent | 2026-12-31 23:59:59 |
| MaxAge | Cookie's expiration time in seconds | 3600 (1 hour), 86400 (1 day) |
| HttpOnly | Indicates that the cookie cannot be accessed by client-side scripts | This cookie will only be included in requests' cookie headers |
| Secure | The cookie is only sent over secure connections | Only sent when the URL starts with https:// |
Choose Save to store the cookie under the appropriate domain in the Apidog cookie manager.Editing and Deleting Cookies#
Edit a Cookie#
To modify an existing cookie:1.
Select the cookie from the list
2.
Make the desired changes to any attribute
3.
Click Save to apply the changes
Delete Cookies#
You have multiple options for removing cookies:| Action | How to Perform | Use Case |
|---|
| Delete Single Cookie | Click "Delete" next to the cookie | Remove a specific unwanted cookie |
| Clear All Cookies | Click "Clear All" in cookie manager | Start fresh or clean up test data |
Sending Cookies with Requests#
Whenever you make a request to a domain to which you've added a cookie, that cookie will appear automatically in the Headers tab of your request.If the cookie is not visible, choose "hidden" to display autogenerated headers.You can't directly override cookie headers in the Headers tab. To modify cookies, use the cookie manager or delete the cookie and set the request headers manually. Cookies added in the cookie manager and the Headers tab are merged by Apidog before a request is sent.
Best Practices#
Use descriptive names: Make cookie names clear and meaningful for easier management
Set appropriate expiration: Use Expires or MaxAge to control cookie lifetime
Secure sensitive cookies: Enable Secure and HttpOnly flags for authentication cookies
Organize by domain: Keep cookies organized by their respective domains for better testing workflows