---
updatedAt: 2026-02-06T00:24:43.000Z
agentTools:
  projectIndex: https://developer.greendot.com/embedded-finance/llms.txt
---

# Create Affiliate

Creates a new affiliate for the specified program.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "BaaS APIs",
    "description": "Green Dot BaaS Partner API",
    "version": "v1",
    "x-generated-timestamp-utc": "2026-02-05T01:14:54.4774970Z"
  },
  "paths": {
    "/programs/{programCode}/affiliates": {
      "post": {
        "tags": [
          "Affiliate"
        ],
        "summary": "Create Affiliate",
        "description": "Creates a new affiliate for the specified program.",
        "operationId": "Affiliate_POST_CreateAffiliate",
        "parameters": [
          {
            "name": "X-GD-RequestId",
            "in": "header",
            "description": "The unique request identifier for tracking.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "programCode",
            "in": "path",
            "description": "The program code to associate the affiliate with.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The affiliate creation request payload.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAffiliateRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAffiliateRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAffiliateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAffiliateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAffiliateResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAffiliateResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAffiliateResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAffiliateResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAffiliateResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAffiliateResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAffiliateResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAffiliateResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CreateAffiliateRequest": {
        "type": "object",
        "properties": {
          "affiliateName": {
            "type": "string",
            "description": "The name of the affiliate to be created.",
            "nullable": true
          },
          "addressLine1": {
            "type": "string",
            "description": "The first line of the affiliate's address.",
            "nullable": true
          },
          "addressLine2": {
            "type": "string",
            "description": "The second line of the affiliate's address (optional).",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "The city where the affiliate is located.",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "The state where the affiliate is located.",
            "nullable": true
          },
          "zipCode": {
            "type": "string",
            "description": "The ZIP code of the affiliate's address.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a request to create a new affiliate.\r\nContains affiliate details such as name and address information.\r\nInherits standard request metadata from Gd.Bos.DataTransfer.Request.RequestBase."
      },
      "CreateAffiliateResponse": {
        "type": "object",
        "properties": {
          "affiliateIdentifier": {
            "type": "string",
            "description": "Gets or sets the unique identifier assigned to the created affiliate.",
            "nullable": true
          },
          "responseDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResponseDetail"
            },
            "description": "Required: A list of response details providing status codes, descriptions, and additional information about the result of the operation.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the response returned after creating an affiliate.\r\nInherits standard response metadata and details from Gd.Bos.DataTransfer.Response.ResponseBase.\r\nContains the unique identifier for the newly created affiliate."
      },
      "ResponseDetail": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "The primary status or error code for the response (e.g., 200 for success, 400 for validation error).",
            "format": "int32"
          },
          "subCode": {
            "type": "integer",
            "description": "An optional subcode providing more granular detail about the response or error.",
            "format": "int32",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "A human-readable description of the response, error, or status.",
            "nullable": true
          },
          "url": {
            "type": "string",
            "description": "A URL linking to documentation or a web page with more information about the response code.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a detailed status or error message for an API response.\r\nContains a code, optional subcode, human-readable description, and a URL for more information.\r\nUsed to provide granular feedback about the outcome of an operation, including success, warnings, or errors."
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "bearer token",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ],
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": false,
    "samples-languages": [
      "csharp",
      "java",
      "python",
      "node",
      "objectivec"
    ]
  }
}
```