{
    "openapi": "3.1.0",
    "info": {
        "title": "Anyflow End User API",
        "version": "1.0"
    },
    "servers": [
        {
            "url": "https://for-product-api.anyflow.jp/sdk"
        }
    ],
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "accessToken"
            }
        }
    },
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "paths": {
        "/send_my_event": {
            "post": {
                "summary": "My Event にリクエストを送信する",
                "description": "My Event にリクエストを送信して、My Event トリガーを発火させます。",
                "operationId": "post-sdk-send-my-event",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "key",
                                    "payload"
                                ],
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "My Event を識別するためのキーです。管理画面で一意な値を定義します。"
                                    },
                                    "payload": {
                                        "type": "string",
                                        "description": "My Event のペイロードです。管理画面で定義したスキーマに沿って記述します。",
                                        "format": "json"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "OK": {
                                        "value": "{ \"status\": \"ok\" }"
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "ok"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "403",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "invalid_token": {
                                        "value": "{ \"error_code\": \"invalid_token\", \"error_message\": \"<null or メッセージ>\" }"
                                    },
                                    "expired_token": {
                                        "value": "{ \"error_code\": \"expired_token\", \"error_message\" : \"<null or メッセージ>\" }"
                                    }
                                },
                                "schema": {
                                    "oneOf": [
                                        {
                                            "title": "invalid_token",
                                            "type": "object",
                                            "properties": {
                                                "error_code": {
                                                    "type": "string",
                                                    "example": "invalid_token"
                                                },
                                                "error_message": {
                                                    "type": "string",
                                                    "example": "<null or メッセージ>"
                                                }
                                            }
                                        },
                                        {
                                            "title": "expired_token",
                                            "type": "object",
                                            "properties": {
                                                "error_code": {
                                                    "type": "string",
                                                    "example": "expired_token"
                                                },
                                                "error_message": {
                                                    "type": "string",
                                                    "example": "<null or メッセージ>"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "404",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "my_event_not_found_or_stopped": {
                                        "value": "{ \"error_code\": \"my_event_not_found_or_stopped\", \"error_message\": null }"
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error_code": {
                                            "type": "string",
                                            "example": "my_event_not_found_or_stopped"
                                        },
                                        "error_message": {}
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "500",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "unknown": {
                                        "value": "{ \"error_code\": \"unknown\", \"error_message\": null }"
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error_code": {
                                            "type": "string",
                                            "example": "unknown"
                                        },
                                        "error_message": {}
                                    }
                                }
                            }
                        }
                    }
                },
                "deprecated": false,
                "x-readme": {
                    "code-samples": [
                        {
                            "language": "curl",
                            "code": "curl -L \\\n  --request POST \\\n  --url 'https://for-product-api.anyflow.jp/sdk/send_my_event' \\\n  --header 'Authorization: Bearer ACCESS_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n    \"key\": \"user_created\",\n    \"payload\": {\"user_name\": \"taro\", \"is_admin\": true}\n}'"
                        }
                    ],
                    "samples-languages": [
                        "curl"
                    ]
                }
            }
        },
        "/token": {
            "post": {
                "summary": "アクセストークンを取得する",
                "description": "My Event 等のエンドユーザーAPIを実行するためのアクセストークンを取得します。",
                "operationId": "post-sdk-token",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "jwt"
                                ],
                                "properties": {
                                    "jwt": {
                                        "type": "string",
                                        "description": "ソリューションを実行したいエンドユーザーを表す JWT を指定します。"
                                    },
                                    "env": {
                                        "type": "string",
                                        "description": "ソリューションを実行したいエンドユーザーの所属するデプロイ環境を指定します。デフォルトのデプロイ環境を使用する場合は指定不要です。"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "200",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "OK": {
                                        "value": "{ \"access_token\": \"<ACCESS TOKEN>\" }"
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "access_token": {
                                            "type": "string",
                                            "example": "<ACCESS TOKEN>"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "403",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "invalid_token": {
                                        "value": "{ \"error_code\": \"invalid_token\", \"error_message\": \"<null or メッセージ>\" }"
                                    },
                                    "expired_token": {
                                        "value": "{ \"error_code\": \"expired_token\", \"error_message\" : \"<null or メッセージ>\" }"
                                    }
                                },
                                "schema": {
                                    "oneOf": [
                                        {
                                            "title": "invalid_token",
                                            "type": "object",
                                            "properties": {
                                                "error_code": {
                                                    "type": "string",
                                                    "example": "invalid_token"
                                                },
                                                "error_message": {
                                                    "type": "string",
                                                    "example": "<null or メッセージ>"
                                                }
                                            }
                                        },
                                        {
                                            "title": "expired_token",
                                            "type": "object",
                                            "properties": {
                                                "error_code": {
                                                    "type": "string",
                                                    "example": "expired_token"
                                                },
                                                "error_message": {
                                                    "type": "string",
                                                    "example": "<null or メッセージ>"
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "500",
                        "content": {
                            "application/json": {
                                "examples": {
                                    "unknown": {
                                        "value": "{ \"error_code\": \"unknown\", \"error_message\": null }"
                                    }
                                },
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error_code": {
                                            "type": "string",
                                            "example": "unknown"
                                        },
                                        "error_message": {}
                                    }
                                }
                            }
                        }
                    }
                },
                "deprecated": false,
                "security": [],
                "x-readme": {
                    "code-samples": [
                        {
                            "language": "curl",
                            "code": "curl -L \\\n  --request POST \\\n  --url 'https://for-product-api.anyflow.jp/sdk/token' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n    \"jwt\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n    \"env\": \"production\"\n  }'"
                        }
                    ],
                    "samples-languages": [
                        "curl"
                    ]
                }
            }
        }
    },
    "x-readme": {
        "headers": [],
        "explorer-enabled": true,
        "proxy-enabled": true
    },
    "x-readme-fauxas": true
}